What do variables do?
Store data.
What is the console used for?
The console is used to display data. (messages, errors, and results—like a hidden notepad for debugging.)
What is JavaScript?
A programming language used to make websites more interactive.
Fix this code: let name = Heschel;
Missing quotes around Heschel
What symbol do you put at the end of most lines in JavaScript?
;
Name the 3 keywords used to create a variable in JavaScript
let, const, var
How do you display "Hello World" in the console?
console.log("Hello World");
What symbol is used for exponents?
**
Fix this code: const pi = 3.14
Missing ;
What is a string in programming?
Text.
A sequence of characters (e.g., "hello").
What is the data type of: "Heschel"?
String
What’s the correct way to display the value of a variable named score in the console?
console.log(score);
What symbol is used for the remainder? (mod)
%
Fix That Code: let isRaining = "false";
Name two types of data in JavaScript.
String, Boolean, Integer, Float
What data type is 1.3?
Float
How do you log both a string ("Score:") and a variable (points)?
console.log("Score: " + points);
What symbol(s) are used for a single-line comment?
//
Fix That Code: let 1stPlace = "winner";
The variable has to begin with a letter, not a number
What is a Boolean, give an example on the board by writing a line of code that contains a boolean.
A true/false value.
Write a JavaScript program that:
Creates a variable called score and sets it to 100
Adds 25 to the score variable using the += operator
let score = 100;
score += 25;
On the board, write two lines of code that will display the message My school is Heschel in the console, using a variable named school.
let school = "Heschel";
console.log("My school is " + school);
What symbol(s) are used for a multi-line comment?
/* */
Fix that Code:
var greeting = 'Hello';
console.log('greeting' + ' class!');
Should not have quotes around the variable name.
Using prompt() and parseInt(), Declare a variable called classes which asks the user how many classes they have.
let classes = parseInt(prompt("How many classes do you have?"));