Chap. 2 eloquent javascript Flashcards
let ten = 10; console.log(ten * ten);
// → 100
let mood = "light"; console.log(mood); // → light mood = "dark"; console.log(mood);
// → dark
let luigisDebt = 140; luigisDebt = luigisDebt - 35; console.log(luigisDebt);
// → 105
let one = 1, two = 2; console.log(one + two);
// → 3
let by = 111; console.log(8 * by);
888
let by = 111; console.log(8 + by);
119
If you ask for the value of an empty binding, you’ll get the value ________
undefined
A single let statement may define multiple bindings. The definitions must be separated by_________
commas
Binding names can be any word. Digits can be part of binding names—catch22 is a valid name, for example—but the name must not start with a _______
digit
A binding name may include ________ or_________ but no other punctuation or special characters.
dollar signs ($) underscores (_)
What is this missing?
let x = 30; console.log("the value of x is" x);
comma before x
console.log(Math.min(2, 4) + 100);
102
The _______ function is a standard JavaScript function that returns true only if the argument it is given is NaN
Number.isNaN
Write short hand:
counter = counter + 1;
counter += 1;
Having the looping condition produce false is not the only way a loop can finish. There is a special statement called_________ that has the effect of immediately jumping out of the enclosing loop.
break