Is it ever possible that
(a ==1 && a== 2 && a==3)could evaluate to
This is interview question asked by a major tech company. My answer was that it’s impossible. They said nothing is impossible. It happened 2 weeks back, but I’m still trying to find the answer. I know we never write such code in our day to day job, but I’m curious.
Here’s a hint: note the
== that’s used, allowing for coercion to happen 😉
(a ==1 && a== 2 && a==3) ever evaluate to true? →
Leave a comment