Answers for "5.1.1. Boolean Values¶"

0

5.1.1. Boolean Values¶

/*The values true and false are not strings. If you use quotes to 
surround booleans ("true" and "false"), those values become strings.*/

console.log(typeof true);
console.log(typeof "true");

//boolean
//string
Posted by: Guest on June-06-2021
0

5.1.1. Boolean Values¶

/*There are only two boolean values---true and false. JavaScript is 
case-sensitive, so True and False are not valid boolean values.*/

console.log(true);
console.log(typeof true);
console.log(typeof false);

//true
//boolean
//boolean
Posted by: Guest on June-06-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language