Strings

When you type a message inside the console.log, that message is actually just a JavaScript string.

console.log("Hello,Jeffrey") // Hello,Jeffrey, is just a string.

Strings can be single letters, like the character h, or even contain numbers, like the string 123.

'h'
"h"
"123"

The important thing is that you use quotes to signify a string.

It is correct to either use double " or single ' quotes with strings, as long as you're consistent.

If you forget to use the quotes, JavaScript will return back an error. I get this reference error because the JavaScript engine thinks I'm talking about a variable called hello instead of a string.

results matching ""

    No results matching ""