This article is going to discuss the difference between passing by value vs passing by reference in JavaScript. We will look at the concept of primitive values and objects which are closely connected to the concept of passing value vs reference. How is that? Well, this almost answers the question from the headline. The main difference between passing by value and passing by reference is that the first is closely connected to primitive values or primitives, while the second takes place when assigning objects. In theory, this sounds neat, but really, let’s take a look at the examples and the concept of passing by value vs reference will be much clearer.