All Flashcards
(78 cards)
what is an operator
+, -, =, <
what are the 7 data types
numbers, strings, boolean, symbols, objects, null, undefined
what does Typeof do
operator that tells the data type
Numbers
1, 3, .87, -4
strings
letters. represent text using ‘’
Booleans
true or false
objects
collection of data
what does objects include
key and values in {} brackets
Arrays
list of values in square brackets []
Null
intentionally absent object or not a possible value
undefined
not yet assigned a value
interpolation
back ticked ` ` can be used for string
interpolation operations
${ insert value}
how can you combine strings
string + string
boolean expression
expressions that return true or false (1 > 0)
what data types are falsey
false, null, undefined, 0, NaN, empty string “ “
what are strict equality operator
===
what are strict inequality operator
! ==
what is not operator
!
what is and operator
&&
what is or operator
||
tenary expression syntax
true or false value ? return if true : return if false
if statement syntax
if (condition) {
code to run if condition is true}
else statement syntax
if (condition) {
code to run if condition is true} else {
code to run if condition is false}