get the app get the app       get the app       get the app
What would be the output of the following statements?
var object1 = { same: 'same' };
var object2 = { same: 'same' };
console.log(object1 === object2);


  • : 208
  • : 2
    Previous Next

    Logs false, JavaScript does not care that they are identical and of the same object type.
    When comparing complex objects, they are equal only when they reference the same object (i.e., have the same address). Two variables containing identical objects are not equal to each other since they do not actually point at the same object.

    you can suggest other answer in comment box


  • Exam: Java Script Interview QUESTIONS





    Recommended Learning for you

    Close(X)
    Subscribe here for free mock test on IAS PCS SSC and other competitive exam. Signup here to get SSC CGL Solution and main exam study material