CJCoding With Joseph
← Back to Question List
JavaScript Code Walkthrough #8

Objects Are References

mediumVariables

📄 Code

Read carefully — what does this print?
1const a = { x: 1 };
2const b = a;
3b.x = 5;
4console.log(a.x);

🎯 Your Answer