In this article, I will be discussing the difference between pass by value and pass by reference.

In javascript, things are either mutable or immutable.

Hm…I know a lot of people don’t understand what that means. Let’s come up with an example:

const a = 4;
let b = a;
b = 5;
console.log(a); // will print out 4

#es5 #javascript #es6

Pass by Value vs Pass by Reference in Javascript
2.05 GEEK