JavaScript Flashcards
What is a variable?
container to store data
What is a string?
characters
What is the difference when it comes to using single quotes or double quotes ( ‘ ‘ or “ “ )?
nothing
How do you escape quotation characters?
\
What is type coercion?
converting type
What is a number in JavaScript?
a data type
What is an arithmetic operator?
mathematical function
Name four of the arithmetic operators?
+ - * / %
Why is the typeof an object null?
object
What is the difference between null and undefined?
null is assigned null
undderfined is no assigned value
Why do you always use === for comparisons?
to make sure data type are same
eg 0 is a falsy value but ‘0’is truthy
What is the difference between undefined and null?
undefined is never assigned value;
null use to assign variable is needed to represent no value
What is a function?
a group of statement to do some special task.
Why are functions useful?
templating reusable
How do you call a function?
Function name with parentheses and argument