You've just learned how to call
console.log() to display some text. The message inside the parenthesis is a string:
'Hello, Buzz Coders!'
String is one of the basic data types in JS. They can be enclosed in either single or double quotation marks.
More string examples:
"I can write code"is a string in double quotes
Single or double quotes are essentially the same, just make sure the quotation marks at the beginning and end of the string match.
Another basic data type is
number type, including both integer and floating point numbers.
8is an integer number
105.88is a floating point number
-75is a negative number
There are no quotation marks around numbers.
Try it! Print out an integer using
console.log() function, like so:
console.log(3 + 15); console.log(3 * 8); console.log(10 - 2); console.log(25 / 5);
18 24 8 5