' ... 'or double quotes
" ... ". Though we prefer single quotes. Some people like to think of string as a fancy word for text.
false(without quotes). It’s helpful to think of booleans as on and off switches or as the answers to a “yes” or “no” question.
undefined(without quotes). It also represents the absence of a value though it has a different use than
But before we do that, let’s get comfortable with strings and numbers!
console.log('Location of Codecademy headquarters: 575 Broadway, New York City'); console.log(40);
In the example above, we first printed a string. Our string isn’t just a single word; it includes both capital and lowercase letters, spaces, and punctuation.
Next, we printed the number 40, notice we did not use quotes.
On line 1, log the string
On line 2, log the number
2011 to the console.
On line 3, print
'Woohoo! I love to code! #codecademy' to the console.
On line 4, print the number
20.49 to the console.