What’s the value of b after the following code runs?
let a = 10;
let b = a;
a = 0;It’s 10. Even though I had gotten it right, I couldn’t have explained why.
Dan Abramov and Maggie Appleton’s course, Just JavaScript, helped me develop a better mental model of how it works and now it’s free to access for everyone.