This question already has an answer here:
- All falsey values in JavaScript 3 answers
var m = 5;
if (m) {
document.write(m);
}
In my view, m is not a bool type, therefore, this if statement will not be executed. However, I do see the value of m printed on my screen. Why?
Aucun commentaire:
Enregistrer un commentaire