false == 'false' // false
false == '' // true
false === '' // false
var x = false || 'foo' // x is 'foo'
var y = true || 'foo' // y is true
var z = y && x // z is 'foo'
Please use real code blocks when you're going to post a long snippet otherwise it gets cut off in vertical displays (indent your code block with four spaces)
28
u/DerGernTod May 28 '19
coercion in general