mardi 5 juin 2018

Empty string should be 'false'

Javascript code:

var empty = '';
console.warn( typeof(empty && null) ); // 'string'

Why does the statement "empty && null" return the empty string? "empty" should be false.

Aucun commentaire:

Enregistrer un commentaire