it is not about web programming ...
Its about strategy ...
Imagine you want to organize a video sharing website like YouTube and for example someone wants to share a video clip ...
There are two ways ...
You save your video somewhere and every time you want to share it with someone, send the address to that person. In this case, you can change the content of the video by changing the content in that address. Also, any person who has that address and uploads a new video at that address. The video you posted will be changed.
The second method is to store the entire video content somewhere and send the entire video to someone every time they request it, instead of just sending them the address.
It is clear that the first method has more advantages. The point here is that:
In the first method, you are working with addresses. And in the second method you are working with values.
Therefore, the events that happen are different.
In the first example, you have two variables, both of which are content type (not address type) and both of which have separate addresses in memory. You set one equal to 2 and then you set the contents of the second house equal to the contents of the first house. Therefore, both get a value of 2. Now you set the value of the second house equal to 3, why this issue should affect the content of the first house.
In the second example, you have two variables (Address type) that both point to the same place. For example, you have two variables, both of which contain a link from YouTube (both links point to a video and an address).
Now if the content inside that address changes. For example, change the video where the address is located. Both links see this change.