Explaining Value vs. Reference in Javascript
Arnav Aggarwal
2.8K20

var arrRef = ['Hi!'];
var arrRef2 = arr;
console.log(arrRef === arrRef2); // -> true

this should have been

var arrRef = ['Hi!'];
var arrRef2 = arrRef;
console.log(arrRef === arrRef2); // -> true
Like what you read? Give Vishal Rajput a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.