Working with variables
importance: 2
- Declare two variables:
adminandname. - Assign the value
"John"toname. - Copy the value from
nametoadmin. - Show the value of
adminusingalert(must output “John”).
In the code below, each line corresponds to the item in the task list.
let admin, name; // can declare two variables at once
name = "John";
admin = name;
alert( admin ); // "John"