Programming Tips 💡
51.6K subscribers
67 photos
10 videos
30 files
354 links
Programming & AI:
Tips 💡
Articles 📕
Resources 👾
Design Patterns 💎
Software Principles ✅

🇳🇱 Contact: @MoienTajik

🎯 Buy ads: https://telega.io/c/ProgrammingTip
Download Telegram
JavaScript — Double Equals VS Triple Equals ✨

JavaScript has two visually similar, yet very different, ways to test equality. 🤓

You can test equality with == or === 🔅


Triple Equals ✅
When using triple equals === in JavaScript, we are testing for strict equality.

This means both the type and the value we are comparing have to be the same.

Example :
77 === '77'
// false (Number v. String)


🔹🔸🔹🔸

Double equals ✅
When using double equals in JavaScript we are testing for loose equality.

Double equals also performs type coercion.

Example :
77 == '77'
// true


https://t.me/pgimg/61

[ Article ] : http://bit.do/jseq

〰〰〰〰〰〰
#JavaScript #Equality
@ProgrammingTip