let name = 'Jane';
What process does the code above perform?
let name;
What process does the code above perform?
Which operator is used to perform variable assignment?
let groceries = ["apples", "potatoes", "milk"];
What is the above groceries variable?
let age = 30;
if (age > 30) {
console.log("older than 30");
} else {
console.log("younger than 30");
}
Predict what will happen in the above example. Which console.logs will actually print?
let groceries = ["apples", "potatoes", "milk"];
Which of the following are the correct ways to access the value of “milk” in the above groceries array?
let puppies = ["Laser", "Katy", "Jet", "Layla"];
What is the value we’d receive if we read the value at puppies[1]?
function potatoSpeak() {
console.log("I am potato!");
}
function sadSpeak() {
console.log("I am NOT potato :(");
}
function isThisPotato(word) {
if (word === "potato") {
potatoSpeak();
} else {
sadSpeak();
}
}
In the code snippet above we have written a function that accepts one word and if that word is “potato” the potatoSpeak function is called - otherwise the sadSpeak function is called. The condition inside the isThisPotato function above is an example of what kind of conditional?
console.log(25 % 2 === 0);
What will the code above print out?
console.log(42 === '42');
What will the code above print out?
console.log(true || (4 / 2 === 0 && !false));
What will the code above print out?
console.log(42 === 42);
What will the code above print out?
console.log(42 == '42');
What will the code above print out?
console.log(true && (4 + 2 === 5));
What will the code above print out?
console.log((24 > 3) && false);
What will the code above print out?
console.log(26 % 2 === 0);
What will the code above print out?