5 < 4 < 3
You’d be expecting to see
false, right? However, you’ll actually see
(5 < 4) < 3
Which in turn gives
false < 3
false into an integer
0 < 3
And zero is indeed less than 3, so we get
Don't miss my latest course, React in Five! This course will help you level up your React skills by covering lesser known parts of the React API. Each video is less than five minutes long, and the first four are free to watch. Get started now.
Subscribe to keep up to date with the latest content.
Join the JS Playground mailing list to be kept up to date with the latest tutorials, screencasts and more. You won't be spammed and you can unsubscribe at any time.