4 1 1 more on strings c2 b6

Solutions on MaxInterview for 4 1 1 more on strings c2 b6 by the best coders in the world

showing results for - "4 1 1 more on strings c2 b6"
Yannick
26 Oct 2019
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');*/
Roberta
08 Nov 2019
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./*
Amy
22 Sep 2018
1console.log(42000);
2console.log(42,000);
3
4//42000
5//42 0
Matías
10 Jan 2017
1console.log(typeof 'This is a string');
2console.log(typeof "And so is this");
3
4//string
5//string
Gianluca
17 Nov 2017
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
similar questions
queries leading to this page
4 1 1 more on strings c2 b6