JavaScript continued

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Which of the given options is an incorrect variable name? $javascript _javascript -javascript

-javascript

difference between === and ==

== - just compares values not the type === - compares the type as well (string vs number) == - tries to make types on both side equal by converting both to the same type

Which of the following function of Number object formats a number with a specific number of digits to the right of the decimal?

B - toFixed()

Which built-in method returns the character at the specified index?

C - charAt()

toDateString() MDN docs

Converts the date portion of a Date object into a readable string

what is prototypal inheritance?

Every object has a property called a prototype, where we can add methods to it and when you create another object from these the newly created object will automatically inherit its parent's property.

difference between let and const

const- after the first assignment you cannot change the value (can modify arrays but cannot reassign values of array)

Which JavaScript label catches all the values, except for the ones specified?

default

Which of the following print content on the browser window?

document.write("print content");

What is the syntax of a "for" statement in JavaScript?

for(initialization; condition; increment)

difference between function declaration and function expressions

funcstion declaration is a can be used before its declaration while a function expression cannot and it has a variable scope

Which of the following function of String object is used to match a regular expression against a string?

match()

Functions set inside objects

methods

only use a class after it has been declared

place classes in a different file and import them allows to define property and object structure without having to declare over and over

Which of the following statements will show a message as well as ask for user input in a popup?

prompt()

Which of the following function of String object returns a string representing the specified object?

toString()

difference between null and undefined

when you assign a value but do not put a value the system adds undefined to the value when you assign a value yourself add null rather than undefined

what is closure and how do you use it?

whena function returns another funtction the returnig

difference between let and var

Var- was in JavaScript since the begging and has a function scope. Var gets hoisted at the top of the function, let does not Let- has a blocked scope

to create class

class

Which of the following is an event listener in JavaScript?

click

What is the correct JavaScript syntax to print "DataFlair" in the console?

console.log("DataFlair");

T or F objects are usually constants

True


Set pelajaran terkait

Digital Marketing - Google Certification

View Set

CH 12 Substance-Related and Addictive Disorders

View Set

Quiz: Mixing Medications From Two Vials in One Syringe

View Set

Module 2 - Investment Risk, Return, and Performance

View Set

Intro to Bio (ch5-6) EXAM QUESTIONS

View Set

Chapter 13: Creating & Sustaining a Healthy Work Environment

View Set

Evolve Fundamentals NCLEX Questions

View Set

White blood cells and phagocytosis

View Set

Abeka American Government Test 5

View Set