How to test same object instance in Javascript? -



How to test same object instance in Javascript? -

say have next objects in javascript:

var = { xxx: 33 }; var b = { xxx: 33 }; var c; c = a;

what javascript test tell me whether dealing same object instance? in other words, should homecoming false , b, b , c, true , c.

you need this

if(c == a) { // same instance }

a == b , b == c homecoming false

javascript instance

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -