== vs === – Beau teaches JavaScript

What’s the difference between double equal signs and triple equal signs in JavaScript? Find out in this video!

🔗 http://codepen.io/beaucarnes/pen/oBbwaN?editors=0012

More info:
🔗 https://appendto.com/2016/02/vs-javascript-abstract-vs-strict-equality/
🔗 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness

Beau Carnes on Twitter: https://twitter.com/carnesbeau

⭐JavaScript Playlists⭐
▶ES6: https://www.youtube.com/playlist?list=PLWKjhJtqVAbljtmmeS0c-CEl2LdE-eR_F
▶JavaScript Basics: https://www.youtube.com/playlist?list=PLWKjhJtqVAbk2qRZtWSzCIN38JC_NdhW5
▶Design Patterns: https://www.youtube.com/playlist?list=PLWKjhJtqVAbnZtkAI3BqcYxKnfWn_C704
▶Data Structures and Algorithms: https://www.youtube.com/playlist?list=PLWKjhJtqVAbkso-IbgiiP48n-O-JQA9PJ
▶Clean Code: https://www.youtube.com/playlist?list=PLWKjhJtqVAbkK24EaPurzMq0-kw5U9pJh

We’re busy people who learn to code, then practice by building projects for nonprofits. Learn Full-stack JavaScript, build a portfolio, and get great references with our open source community.

Join our community at https://freecodecamp.com
Follow us on twitter: https://twitter.com/freecodecamp
Like us on Facebook: https://www.facebook.com/freecodecamp
Follow Quincy on Quora: https://www.quora.com/Quincy-Larson

27 thoughts on “== vs === – Beau teaches JavaScript

  1. at 1:32 it's not correct to say that '1' is converted to true. That's not what's happening there. Whenever true is compared using loose equality, it's converted to a 1. Then the comparison becomes 1 == '1'. At this point, '1' is converted to 1 (because using loose equality, when comparing a number to a string, the string is implicitly coerced to a number). So at this point, it becomes 1 == 1, which causes it to evaluate as true.

Leave a Reply

Your email address will not be published. Required fields are marked *