repl.it
@anonymous/

ShamelessDelectableLint

Nodejs

No description

fork
loading
Files
  • index.js
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const x = ["1.23", 2137123, "wut", false, "lol", undefined, null]
  .map(Number).filter(Boolean)

console.log(x)

let b = true
if(b) console.log('logged')

b = false
if(b) console.log('not logged')

b = undefined
if(b) console.log('not logged')

b = null
if(b) console.log('not logged')

console.log(new Boolean(NaN))
console.log(Boolean(NaN))
console.log(Boolean(""))
console.log(Boolean({}));
console.log(new Boolean([]));

const value = Boolean("Stefan") // true
const reference = new Boolean("Stefan") //

console.log(value == reference) // true
console.log(value === reference) // false

console.log(value === reference.valueOf()) // true
node v10.16.0