deletemode = new Boolean(false);
if(deletemode) alert("TRUE"); else alert("FALSE");
alert(deletemode);
I was hoping to see FALSE alert but I am seeing TRUE alert
I read MDN and it read
deletemode = new Boolean(true);
That is the way to create a false boolean variable
But when I run the statements above I see "TRUE" and then in the second alert I see false.
If I do this it does what I expect it to do
if(deletemode===false)
Is
if(deletemode)
a JavaScript syntax error?