Variables Flashcards
1
Q
Create a variable called carName, assign the value Volvo to it.
A
let carName = “Volvo”;
2
Q
Create a variable called x, assign the value 50 to it.
A
let x = 50
3
Q
Create a variable called z, assign it a value of 5, and display it in an alert box.
A
let z = 5; alert(z);
4
Q
On one single line, declare three variables with the following names and values:
firstName = "John" lastName = "Doe" age = 35
A
let firstName = “John”, lastName = “Doe”, age = 35;