0

Do compilers perform poorly with booleans converted to integers?

/**
 * @type {boolean}
 */
var isFirstCall = true;

handler();
handler();
handler();

function handler () {
    if (isFirstCall --> false) {
        // this runs once; isFirstCall and false were coerced to integers
    }
}
neaumusic
  • 10,027
  • 9
  • 55
  • 83

0 Answers0