Variables are Labels

  • Variables "label" a piece of data
  • This means that you can update one object using two different variables
  • JavaScript does not copy values when setting variables
const ryan = { name: "Ryan", age: 26, job: "Developer", id: "abc123" };
const evilTwin = ryan;
evilTwin.isEvil = true;

5 / 24