web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Nishant Rana’s Weblog / JavaScript Gotcha: Why [x =...

JavaScript Gotcha: Why [x == (a || b)] Fails

Nishant Rana Profile Picture Nishant Rana 11,325 Microsoft Employee
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.

Comments

*This post is locked for comments