Let’s look at the concept of Value vs Reference. Every JavaScript developer should know this topic as it’s often the reason behind bugs in today’s applications. Also, it’s often one of the job interview questions.

I will cover the basics as easily as I can in this short article.

Don’t scroll down too quickly. Do you know what these two examples return?