This keyword creates a variable whose value can be updated later.
What is let?
This function is used to ask the user for their name or any other text.
What is readLine()?
This function is used to display messages in the console.
What is console.log()?
This function gives you a random whole number between two values.
What is Randomizer.nextInt(start, end)?
This keyword is used to define a function in JavaScript.
What is function?
This is the value stored in the variable after this code runs:
let x = 5 + 4 * 3;
console.log(x);
What is a 17?
This number will be printed if the user types 6 at the prompt:
let num = readInt("Enter a number:");
console.log(num + 2);
What is 8?
This is printed to the screen:
console.log("Hello, world!");
What is "Hello, world!"?
This number is always printed:
console.log(Randomizer.nextInt(1, 1));
What is 1?
In pair programming, this person writes the code.
Who is the Driver?
This keyword creates a variable that cannot be reassigned.
What is const?
This function asks the user to enter a decimal number.
What is readFloat()?
This is the full output:
let a = 4;
let b = 3;
console.log("Sum is: " + (a + b));
What is "Sum is: 7"?
This function gives a random decimal between two values.
What is Randomizer.nextFloat(start, end)?
This is what happens if you define a function but never call it.
What is nothing?
This number is printed to the screen:
let x = 10;
x = x - 2 * 3;
console.log(x);
What is 4?
This value is stored in the variable:
let word = readLine("Say something:");
// User types: banana
What is "banana"?
This is the result when the following code runs:
console.log(5 + 3 + " stars");
What is "8 stars"?
This is one possible output of this code:
let result = Randomizer.nextInt(3, 5);
console.log(result);
What is 3, 4, or 5?
This symbol assigns a value to a variable in JavaScript.
What is the assignment operator (=)?
This is the final value of score:
let score = 7;
score = score + 2;
score = score * 3;
What is 27?
This is what happens if you run this code and the user types "pizza":
let food = readInt("Favorite food?");
console.log(food);
What is nothing?
p>This happens if you forget the closing quote in a console.log() line.
console.log("Missing quote);
What is a syntax error?
This is the output range for this code:
Randomizer.nextFloat(0, 1);
What is any decimal between 0 and 1?
This is how you create a function that takes no input and prints "Done!"
What is:
function showDone() {
console.log("Done!");
}