JavaScript Gotcha: Why [x == (a || b)] Fails
Views (1)
Recently we observed that our JavaScript code was not working as expected. Now when we write conditions in JavaScript, it’s natural to want to check if a variable equals one of multiple values. A common mistake is to write the condition like this: At first glance, it seems like this would check if ‘loanType’ is … Continue reading "JavaScript Gotcha: Why [x == (a || b)] Fails"
This was originally posted here.
*This post is locked for comments