Value vs Reference in JavaScript in 1 Minute

preview_player
Показать описание

JavaScript Copy by Value vs. Copy by Reference.

This is episode 10 in a 10 part series I’m calling 10 things javascript. Today for episode 10, we’re looking at the difference between Primitives and Objects. Episode 10: Value vs. Reference. Let’s go!
Рекомендации по теме
Комментарии
Автор

Some of the better short form dev content I've come across.

sknslife
Автор

I love your youtube shorts. One thing I would suggest though is put the link of the full video in the comments so it can be readily accessible.

UrekMazlno
Автор

Awesome !! best channel to learn javascript

andreaslassak
Автор

Technically null is an object, but it goes by value. typeof null === 'object'. And NaN (not a number) with the type number, is a primitive, but goes by reference. So there are a few exceptions to this rule

boem
Автор

Great content but really sorry about background music disturbs.

shadbkhat
Автор

very great content, video editing and overall presentation. But please remove the background noise. Thank you. I just found out about your channel and it's a great ride so far.

tjtechi
Автор

Had a question
If thier is a object like a with value 5
And b with a value 5 too
So does both refer to a same place
And if it does will changing b affect a?

lex-ztuc
Автор

Could you create a checksum of two objects by hashing them and comparing their hashed values to determine equality? That's the first thing that comes to mind for me, though I'm sure there are more efficient ways to handle it.

Tanner_Goodale
Автор

Aren't symbols primitives too? And bigInt 🤔

mitkomilev
Автор

Fun fact: *typeof* keyword is broken and says *null* is a object tho it's not, u can't assign properties to null. *typeof null === "object";* // true

hadawardgz
Автор

I have dealt with that in a game I'm programming. Isn't that hard to fix the addressing problems

gdmathguy
Автор

is it possible to print the memory reference from an object?

juanpablocastrohurtado
Автор

Technically, everything in JavaScript is an object.

codeclockyt
Автор

string and numbers are definitelly not primitives in js, these are objects too (you can extend them, call functions on them)

florinflorin