JavaScript objects are written with curly braces.
Object properties are written as name:value pairs, separated by commas.
Back
True or false:
JavaScript evaluates expressions from right to left?
Front
False.
It evaluates them from left to right.
Back
What is Complex Data?
Front
The typeof operator can return one of two complex types:
function
object
The typeof operator returns "object" for arrays because in JavaScript arrays are objects.
Back
What does the typeof operator do?
Front
You can use the JavaScript typeof operator to find the type of a JavaScript variable.
The typeof operator returns the type of a variable or an expression:
Back
What is a series of characters like "John Doe"
Front
A string.
Back
What does a "object" data type look like?
Front
var x = {firstName:"John", lastName:"Doe"};
Back
What is an Array?
Front
allows you to store and work with multiple values of same data type.
They are written with square brackets.
Array indexes are zero-based, which means the first item is [0], second is [1], and so on.
Back
What is Primitive Data?
Front
A primitive data value is a single simple data value with no additional properties and methods.
The typeof operator can return one of these primitive types:
string
number
boolean
null
undefined
Back
What does a "string" data type look like?
Front
var lastName = "Johnson";
Back
What does Null mean in JavaScript?
Front
null is "nothing". It is supposed to be something that doesn't exist.
Unfortunately, in JavaScript, the data type of null is an object.
You can empty an object by setting it to null:
Back
How are JavaScript types dynamic?
Front
They are dynamic because the same variable can be used to hold different data types.
Back
What are data types?
Front
numbers, strings, objects and more.
Back
What does a "number" data type look like?
Front
var length = 16;
Back
True or false:
Numbers cant be written with decimal places.
Front
False.
Numbers can be written with, or without decimals.
Back
What is a Boolean?
Front
They can only have two values: true or false and are often used in conditional testing.