“5.1.1. Nilai Boolean” Kode Jawaban

5.1.1. Nilai Boolean

/*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
Tough Tortoise

5.1.1. Nilai Boolean

/*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
Tough Tortoise

Jawaban yang mirip dengan “5.1.1. Nilai Boolean”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya