Advanced JavaScript Tutorial in Hindi #5: Reference Data Type vs Primitive Type in JavaScript

preview_player
Показать описание
Welcome, all we will see Advanced JavaScript in Hindi. Reference Type in JavaScript. A variable can hold one of two value types: primitive values or reference values.

Primitive values are data that are stored on the stack.
Primitive value is stored directly in the location that the variable accesses.
Reference values are objects that are stored in the heap.
Reference value stored in the variable location is a pointer to a location in memory where the object is stored.
Primitive types include Undefined, Null, Boolean, Number, or String.
The Basics:

Objects are aggregations of properties. A property can reference an object or a primitive. Primitives are values, they have no properties.

Updated:

JavaScript has 6 primitive data types: String, Number, Boolean, Null, Undefined, Symbol (new in ES6). With the exception of null and undefined, all primitives values have object equivalents which wrap around the primitive values, e.g. a String object wraps around a string primitive. All primitives are immutable.
Рекомендации по теме
Комментарии
Автор

Great explanation. is it possible to create a video for the difference between Heap & Stack, please ? there is no good video on youtube about it.

sarfrazshah
Автор

Wow.. I really dont knw that.. Thanks bro

johnthapa
Автор

Good video sir plz upload more advanced javascrit video

DINESHSAINI-tnlw
Автор

Sir App ye Animation Effect Konse Software PAr Kart ho PowerPoint me kya?

SajidKhan-dibj
Автор

please lower your volume in all the videos..people who use earphone really get affected with the loud sound. When I come to your videos from other channel I end up tearing my eardrum. Now I keep your videos to 10% volume.Rest is all good👍

abramgrey
Автор

But sir jb hm 2 seperate integer ko declare krte h to vo same hote h jbki integer b seoerate block bnate h.... To array kyu ni hote same double declare krne pe

shadiviahofficial
Автор

Question:?
Bhai function ke case m
Sabhi function true aa rhe h(jabki function bhi to object ki tarah heap m store hote h)
let fun1=() =>{ val1=5;}
let fun2=() =>{val2=10;}
Then in console:
fun1() ==fun2()
True
Why? 🤔🤔🤔🤔🤔🤔

Grow_SathMe
Автор

where is #4 of this series i did not getting

brksphone
Автор

Bro it's core java concepts. Object reference.. 🤔

luckypataudi
join shbcf.ru