Javascript Flashcards
1
Q
Javascript
Variables
A
var dog; let dog = 'string'; const dog;
2
Q
Javascript
How do you write the T/F boolean?
A
True
False
3
Q
Javascript
The Abscense of a value
A
Null
4
Q
Javascript
Undefined
A
A variable that does not yet have an assigned value
5
Q
Javascript
For giant math
A
BigInt
6
Q
Javascript
Symbol data type
A
const sym1 = Symbol(); const sym2 = Symbol("foo"); const sym3 = Symbol("foo"); sym2 != sym3
Guaranteed unique
7
Q
Javascript
And
A
&&
8
Q
Javascipt
Or
A
||
9
Q
Javascript
Not
A
!
10
Q
Javascript
Difference between == & ===
A
3 === will check for strict equality. 100 != "100" 2 equal objects will not be equal because they are different objects !== will check for strict inequality
11
Q
Javascript
If Statements
A
if ('this' == false) { //do stuff } else if ('this' == 'cake') { // other stuff } else { // }
12
Q
Javascript
Switch Statement
A
switch (place) { case 'first': // do stuff break; case 'second': // do stuff break; default: break; }
13
Q
Javascript
For Loop
A
for (var i = 5; i > 0; i--) { console.log(i); }; console.log('Countdown finished!');
14
Q
Javascript
While Loop
A
var i = 5; while (i > 0) { console.log(i); i = i - 1; }; console.log('Counting completed!');
15
Q
Javascript
Functions
A
// A function that accepts two parameters function letterFinder(word, match) { // do stuff }