Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Assign the string "Ken the Ninja" to the name variable
- //Define
- var name; // note: using "let" is better than using "var"
- //Assign
- name = "Ken the Ninja"; // enclosed in quotes
- // Print the name variable
- //Print the value of the name variable to the console.
- console.log(name); // I'm getting the "value" of name from name itself
- // Print "name" as a string
- //Let's also check that a variable becomes a string if you enclose it in quotes.
- console.log("name"); //I'm printing a string literal. Literally name, not the variable called name.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement