Level 28 Level 30
37 words 0 ignored
Ready to learn Ready to review
Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.
What data types are there?
numbers, strings, arrays, objects and more:
examples of that
var length = 16; // Number
in a variable
Where do we store the data in js?
js treats them in a different way
Why do we have to know about the type of a data?
var x = 16 + "Volvo";
How does js treat a situation where we want to add a number to a string?
Do we get an error message if we use assignment instead of equality?
How does js treat an összeadást if one operand is a number and the other is a string?
In what direction does js evaluate expressions?
var x = 16 + 4 + "Volvo";
var x = "Volvo" + 16 + 4;
This means that the same variable can be used as different types:
we store them in a variable.
What do we do with datatypes to be able to work with them?
What is a string or text string?
A string (or a text string) is a series of characters like "John Doe".
When can we use quotes inside the quotes?
You can use quotes inside a string, as long as they don't match the quotes surrounding the string: in php you can skip quotes.
What are numbers?
1, 2, 3 etc
How many types of numbers are there?
How can numbers be written?
Numbers can be written with, or without decimals:
What do we call numbers in other words?
How many values do booleans have?
Booleans can only have two values: true or false.
You don't need a button to click on. It can be any element of the page( true/false ).
When are the boolean used most often?
Booleans are often used in conditional testing.
What are arrays?
a set of values.
How are js arrays written?
how are array items separated?
Array items are separated by commas.
how do we declare (create) an array called cars that contains 3 values?
The following code declares (creates) an array called cars, containing three items (car names):
Array indexes are zero-based,
What kind of index system is used in js?
What does it mean that it is zero-based?
it means the first item is , second is , and so on.
What is an object.
it is a value type like an array. however it is not a set of literal values but it is a set of (variable values) properties and methods belonging to one group.
How are js objects written?
How are object properties written?
Object properties are written as name:value pairs, separated by commas.
How many properties do the object (person) above have?
The object (person) in the example above has 4 properties: firstName, lastName, age, and eyeColor.
What is undefined value?
What is empty value?
An empty value has nothing to do with undefined.
What is The typeof Operator for?
example of typeof operator?
typeof "John" // Returns string
Why does typeof [1,2,3,4] return an object?