In JavaScript, is there any significant difference in performance between querying a boolean variable's value or testing for the equality of two strings.
For example, which of these, if any, is more efficient:
Boolean example:
var testBoolean = false;
if (testBoolean) {
alert('false')
}
String example:
var testString = 'false';
if (testString !== 'false') {
alert('false')
}
Thanks!
ifcondition. The 2nd will pass andalert().