What is the Difference between == and ===?
About 1 min
What is the Difference between == and ===? 관련
The JavaScript Interview Prep Handbook – Essential Topics to Know + Code Examples
JavaScript is a widely used language in web development and powers interactive features of virtually every website out there. JavaScript makes it possible to create dynamic web pages and is very versatile. JavaScript remains one of the most in-demand programming languages in 2024. Many companies are looking for proficiency in...
The JavaScript Interview Prep Handbook – Essential Topics to Know + Code Examples
JavaScript is a widely used language in web development and powers interactive features of virtually every website out there. JavaScript makes it possible to create dynamic web pages and is very versatile. JavaScript remains one of the most in-demand programming languages in 2024. Many companies are looking for proficiency in...
This is really simple, yet a very commonly asked in interviews.
let a = 1;
let b = "1";
console.log(a == b); // true
console.log(a === b); // false
==
compares only the value ofa
andb
,===
compares both value and data type ofa
andb