SO - 24730166
by Arun P Johny
JavaScript
var n = null;
if (n) { //true if n is truthy
console.log('has value');
} else {
console.log('null');
}
by Arun P Johny
var n = null;
if (n) { //true if n is truthy
console.log('has value');
} else {
console.log('null');
}