1console.log('Bruce's beard');
2
3/*Strings in JavaScript can be enclosed in either single quotes (')
4or double quotes (").Double-quoted strings can contain single quotes
5inside them, as in "Bruce's beard", and single quoted strings can have
6double quotes inside them, as in 'The knights who say "Ni!"'.
7JavaScript doesn't care whether you use single or double quotes to
8surround your strings. Once it has parsed the text of your program or
9command, the way it stores the value is identical in all cases, and the
10surrounding quotes are not part of the value./*
11
12Warning
13If a string contains a single quote (such as "Bruce's beard")
14then surrounding it with single quotes gives unexpected results./*
15
16console.log('Bruce's beard');*/
1console.log(typeof "17");
2console.log(typeof "3.2");
3
4/*What about values like "17" and "3.2"? They look like numbers,
5but they are in quotation marks like strings.
6Run the following code to find out./*
1console.log(typeof 'This is a string');
2console.log(typeof "And so is this");
3
4//string
5//string
1console.log(42, 17, 56, 34, 11, 4.35, 32);
2console.log(3.4, "hello", 45);
3
4//42 17 56 34 11 4.35 32
5//3.4 hello 45