JavaScript falsy values comparison
Jun 3, 2023
JavaScript type conversion is sometimes confusing. I created a table to understand falsy values comparison with “==”. If “-” is put before undefined and NaN, it returns NaN. Others return 0.
JavaScript type conversion is sometimes confusing. I created a table to understand falsy values comparison with “==”. If “-” is put before undefined and NaN, it returns NaN. Others return 0.
Senior Software Engineer at two industry-leading startups ( Go | Ruby | TypeScript | JavaScript | Gin | Echo | Rails | React | Redux | Next)