I didn’t get much clarity in the video that everything in javascript is passed by value but in case of non-primitive data types, the value itself is a reference I want to ask what happens in case of primitive data type they also have the reference? if they have why don’t their reference not passed as value?
Pass by Value and Pass nby reference
See this: https://www.javascripttutorial.net/javascript-pass-by-value/
Here, it is very nicely explained.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.