Variables Flashcards

1
Q

Create a variable called carName, assign the value Volvo to it.

A

let carName = “Volvo”;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Create a variable called x, assign the value 50 to it.

A

let x = 50

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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);
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly