자료형


boolean : 참/거짓 여부

let bool1 = true; // 참
let bool2 = false; // 거짓

console.log(bool1, bool2);
console.log(typeof bool1);
const bool3 = 1 < 2;
const bool4 = 1 > 2;

console.log(bool3, bool4);
let bool5 = !true;
let bool6 = !bool5;
let bool7 = !!bool6;

console.log(bool5, bool6, bool7);