Day 28.1: Advanced JavaScript (pass by value vs pass by Reference)

Опубликовано: 13 Июнь 2026
на канале: Ridwan Balogun (ridbay)
41
1

Primitive types are passed by value, making a copy of the original values.
Objects are passed by reference which means that we don't copy the values like we did with primitive types.
In pass by reference, instead of making a copy of the original value, you are making a reference to the original value. So, a change made on the reference is actually changing the original.