U
Une Bévue
if I have:
var toto;
console.log(" typeof toto = "+(typeof toto));
console.log(" toto = "+(toto)? true : false );
toto=null;
console.log(" typeof toto = "+(typeof toto));
console.log(" toto = "+(toto)? true : false );
the result is 'true' in both cases :
typeof toto = undefined
toto = true
typeof toto = object
toto = true
then, if I use the test :
if( toto )
what could I expect in both preceeding cases ?
normaly, afaik, I'd expect first case being undefined to false
second case being null to false also, isn't it ???
var toto;
console.log(" typeof toto = "+(typeof toto));
console.log(" toto = "+(toto)? true : false );
toto=null;
console.log(" typeof toto = "+(typeof toto));
console.log(" toto = "+(toto)? true : false );
the result is 'true' in both cases :
typeof toto = undefined
toto = true
typeof toto = object
toto = true
then, if I use the test :
if( toto )
what could I expect in both preceeding cases ?
normaly, afaik, I'd expect first case being undefined to false
second case being null to false also, isn't it ???