Understanding Passing by Reference or Value in JavaScript

preview_player
Показать описание
This video tutorial explains the difference between passing by reference and passing by value in Javascript. Also discussed are the concept of passing and Primitive vs Object datatypes.

Рекомендации по теме
Комментарии
Автор

Finally soone who speaks in a calm way and getting to the point asap

suelembezerra
Автор

People who are wanting to fully understand JavaScript should go to this guy. You are so great at explaining things simply. Thank you.

edwardm
Автор

You always strive to pass understanding in your teaches, not just knowledge
Thank you sir !!!!

titokris
Автор

Well explained, I came here from the previous passing by reference video by yours. Everything settled down in my mind after getting them one after another. Thank you sir.

endless
Автор

Thank you sir. I truly appreciate your hardwork and effort that you're putting to explain us.

faizanahmed
Автор

Thank you for the video on this key topic!

farrellkatz
Автор

Thank you Professor! This is the best explanation that made it clear for me and I've seen many!

eduardcojocaru
Автор

this was exactly what I needed to understand passing by reference. thank you for taking the time to do this.

jaymzechapman
Автор

Thanks Steve, it helped me a lot getting through this subject. I'm currently on a learning path with Codecademy (which should learn from you) and Mosh Hamedani, but I'm sure when I'm done I will watch all of your videos.

One question though: why did you use {} when logging the param?
Thank you!

LearnEnglishwithKevin
Автор

Thank you so much for this! Appreciate it so much

hertechera
Автор

The main difference between C and JavaScript is that in C, we explicitly pass the memory address of a variable to the function using pointers to achieve pass by reference, whereas in JavaScript, we do not explicitly pass a memory address, but rather pass a reference to the original object by value. So I think we do not have pass by reference in JS, all we have is pass a reference.

amir
Автор

Thank you sir, hope you make a typescript tutorials.

General_Aladeen
Автор

I believe there is a little fault in the logic of this demonstration as the "num" you're logging out on line 35 is not the "num" you are passing into the function on line 40, but is simply the "num" variable declared on the global scope. To prove it, if you pass into the function some other number variable, you will get the same console result... :)

LuciendelMar
Автор

Ah thank you steve, i am new to js and just meet this problem, but how can i copy the value to new object?

PixelLoafLatte