loading...

Day 1 -> 40 days of code.

sagargnawali profile image Sagar Gnawali ・1 min read

shallow comparison operator.
When it comes to string a(sc)b returns true and in case of array and object it returns false.
ie for primitive data types a(sc)b true and for complex data types a(sc)b false.

Let's check
var a="data";
var b="data";
var a=c;
console.log(a===b,a===c);//true,true

var a=[1,2,3];
var b=[1,2,3];
var a=c;
console.log(a===b,a===c);//false,true

javascript #code

Discussion

pic
Editor guide