Type coercion confusion in JavaScript
Today I learned this is not true in JavaScript, and I'm shocked 🤯
— James Q Quick (@jamesqquick) June 13, 2022
"true" == true //returns false
My answer
Yes, when you allow coercion with == you get NaN is not equal to 1.
— Ivan Bunčić 🦄🥑⌨ (@ivanbuncic) June 14, 2022
That is what the spec says.https://t.co/c2rEghMaTq
When you are in doubt, read the Spec please.
About the author
𝙵𝚞𝚕𝚕 𝚂𝚝𝚊𝚌𝚔 𝙲𝚘𝚙𝚢 𝙿𝚊𝚜𝚝𝚎𝚛 ™ | Started in 1984 with LOAD '''' ENTER & PLAY.
Comments
Join the discussionNo comments yet. Be the first to comment.