Hi scripting experts,
I want to know the best practice of using strict equality and loose equality.
When should I use the strict equal signs (`===` and `!==`) and the loose equal signs (`==` and `!=`)?
For example,
var a = prompt(‘a’,’a’);
console.log(a);
console.log(a === 'a'); //false
console.log(a == 'a'); //true
How can I use `===` in the above example? I thought using strict equality can avoid bugs so I want to use strict equal sign if possible.
Thank you very much.
Ka-lip