I am checking if a value is not falsy with
if (value) {
..
}
but I do want to accept zeros as a (non-falsy) value. How is this normally done? Would it be
if (value || value === 0) {
..
}
or what?
I am checking if a value is not falsy with
if (value) {
..
}
but I do want to accept zeros as a (non-falsy) value. How is this normally done? Would it be
if (value || value === 0) {
..
}
or what?