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
Shajibul Alam Shihab -
Michael Andreuzza -
Frank William -
James -
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,