Implicit Coercion I
2022年5月1日小于 1 分钟
Implicit Coercion I
Question
What does the code snippet to the right output by console.log
?
Snippet
console.log(Boolean('false'))
console.log(Boolean(false))
console.log('3' + 1)
console.log('3' - 1)
console.log('3' - ' 02 ')
console.log('3' * ' 02 ')
console.log(Number('1'))
console.log(Number('number'))
console.log(Number(null))
console.log(Number(false))