const zero = new Number(0);
if (zero) {
console.log("zero is truthy!");
} else {
console.log('zero is false!');
}
For further actions, you may consider blocking this person and/or reporting abuse
const zero = new Number(0);
if (zero) {
console.log("zero is truthy!");
} else {
console.log('zero is false!');
}
For further actions, you may consider blocking this person and/or reporting abuse
Techcreator USA -
ScottPony -
Sanjay Paul -
Harold Defree -
Top comments (3)
Oh, JavaScript and it's mysterious ways.
new Number() creates a object wrapper. So it turns out to be true
zero is truthy,