Objects in depth in javascript in hindi | chai aur

  Рет қаралды 298,525

Chai aur Code

Chai aur Code

Күн бұрын

Пікірлер: 390
@quickSilverXMen
@quickSilverXMen Жыл бұрын
@1:13 objects intro @7:20 object key using symbol datatype @9:30 adv. @11:00 freezer( ) method in object @12:00 symbol snip again
@shouviksarkar7900
@shouviksarkar7900 7 ай бұрын
14:51 undefined is bcz in greeting function we already had console.log('message') ...but while calling the function you used console.log(greeting()) again. due to to console.log() we are getting an undefined. Just write gretting() and there will be no undefined. same goes for 17:05
@razashah7881
@razashah7881 7 ай бұрын
Sir bundle of thanks, yahan tk pohnch kar mujhe wakeyhi lag ra hey k ye course bohat keemti hey, is sey pehley me 2 bar JS ko doosrey mentors sey bhi kar chuka hun, ab third time aapse seekh raha hun, yahan aa kar mujhe aik bat ki zroor realization hui hey, wo ye k ab me ye dekhta hun k jis mentor sey me seekh raha hun, usey khud ko JS ka kitna pata hey, me sabhi mentor ki izzat karta hun, lakin in depth kabhi na kabhi student k dil esa phase zroor ata hey k wo critical way me sochney lagta hey, aik to aapkey teaching style bohat unique hey, or friendly hey, secondly aap apni tarf sey bharpoor try kartey hen k me jo bat samjha raha hun, wo student k dimagh me literally ghuss jaey.
@tusharsachdeva3654
@tusharsachdeva3654 Жыл бұрын
Thanks! Awesome way of explanation man. Damn
@ayaniegain
@ayaniegain Жыл бұрын
The uniqueness of your course, you not only teach the topic but also learn the exact use of it.🥰
@HydroJudge
@HydroJudge Жыл бұрын
Iss lecture mein jo sir ne concepts bataaye hain woh sach mein in depth hain. Notes banaake aur ache se samajh aata hai. This series is lit.
@codekalam
@codekalam 4 ай бұрын
### Correction @ 1.25 Object Literal: Naturally supports Singleton pattern by creating a single instance and providing global access through a closure. It’s a straightforward approach for ensuring only one instance. Constructor: By default, allows the creation of multiple instances. To implement Singleton behavior with a constructor, additional logic is needed to ensure only one instance is created and managed. Thus, while object literals inherently create a single instance, constructors require extra steps to achieve the same Singleton behavior
@Ayush-p9n
@Ayush-p9n Жыл бұрын
finally found a great teacher on youtube , really really helpful
@AishaAkram-jt7fy
@AishaAkram-jt7fy 2 ай бұрын
Loved the series till now .I am frontend developer and learning backend technology. I have been working along JS but still watching this playlist bcz its always having something new to learn .To everyone who is beginner Don't worry you are watching best JS series of internet .So keep rocking and keep pushing the boundries . Grateful to you sir for you efforts .I am in love with this playlist and yt channel too .The way you teach does not let us bored and we are learning in fun way .I would say you are having the best extraordinary communication skill.LOve from Pakistan
@Quickkit
@Quickkit Жыл бұрын
@15:15 hello sir,undefined is the return value of the function greeting( ).
@farazahmed1668
@farazahmed1668 Жыл бұрын
Q k humne dar-asal value ko print karwaya hai na k return, to jab kuch b return nahi hoga... to by default undifined he return hoga.
@tourwithyou
@tourwithyou 4 ай бұрын
just call the function don't use console.log e.g Jsuser.greeting()
@Sgsbakers
@Sgsbakers Жыл бұрын
in greeting & greetingTwo functions you log messages to the console but don't return anything, so they implicitly return undefined as an output after every console. But when we use return keyword in functions instead of console.log it will not output 'undefined'.
@agentNirmites
@agentNirmites Жыл бұрын
Why he didn't get it?
@parvahuja7618
@parvahuja7618 10 ай бұрын
true, because whenever we are using { } we have to explicitly write return whereas when simply using ( ) we do do not need to write it
@MdShadabIrfan
@MdShadabIrfan Ай бұрын
This is true I have edited the userDetails.greeting and the undefined is gone now. Thanks @sgsbakers. New code is => userDetails.greeting = function(){ return `Hello JS user, ${this["name"]}`;
@abdush5830
@abdush5830 Жыл бұрын
love you sir..ye Internet ki best series hai JS ki..Jitna aap deep explain kr rahe hain utna kisi ne ni kia hai Yt pr...very thanks Sir
@phantomcatprojects8546
@phantomcatprojects8546 Жыл бұрын
hitesh sir be like raat 12:30 baje hai to best object tutorial to bana lu
@ravindrasuryawanshi7666
@ravindrasuryawanshi7666 3 ай бұрын
Best and in depth tutorials, Hitesh sir "sikhana hai to investigation ke saath" ye sahi bat hai...
@vasudev3744
@vasudev3744 10 ай бұрын
sir the undefined value that is being printed on the screen is bcoz u r printing the return of the function which is not defined console.log(JsUser.greeting()) is wrong instead use JsUser.greeting() for calling the function
@youtube_reels..
@youtube_reels.. 7 ай бұрын
thank you
@AmitRaj.2
@AmitRaj.2 Жыл бұрын
The full name has space in between and thus it cannot be acessed using . Notation but if there is no space and if we type the key in string expression like 'fullname' it can be accesed using . Notation
@gamingwithme630
@gamingwithme630 10 ай бұрын
right bro
@meetshafiniazi
@meetshafiniazi 4 ай бұрын
14:50 I think we are printing a print function that's why we are getting undefined after output. as you can see the function at line number 31 we are printing something in function. So we don't need external print command to print line 31. we can simply execute function without console.log()
@md.talibansari7388
@md.talibansari7388 Жыл бұрын
@14:51 "undefined" is appearing because the function is not returning anything, and you have called the function inside the console.
@satyanarayandalei-rz2kw
@satyanarayandalei-rz2kw 11 ай бұрын
Exactly
@RajkumarSingh-i5n
@RajkumarSingh-i5n 4 ай бұрын
yes you catched it bro
@learning-shaharyar550
@learning-shaharyar550 8 ай бұрын
10:00 The syntax of declaring a symbol inside object still does not seem to be correct because upon console.log(typeof JsUser[mySym]); // It returns *string* , whereas ideally it should return Symbol as its dataType.
@hobabu7066
@hobabu7066 7 ай бұрын
Same doubt, have you got any answer ?
@shaharyaransari4887
@shaharyaransari4887 6 ай бұрын
@@hobabu7066 The Explaination was quite confusing. However following code prints type of symbol: // Objects let mysymbol = Symbol('Key1'); let myobj = { name: "Shaharyar Ansari", id: 1232, [mysymbol] : mysymbol } console.log(typeof myobj[mysymbol]);
@shaharyaransari4887
@shaharyaransari4887 6 ай бұрын
The only reason for using Square brackets inside an object is to assign a dynamic key. Forexample: let key = 'dynamicKey'; let value = 'This is a dynamic value'; let obj = { [key]: value }; console.log(obj); // Output: { dynamicKey: 'This is a dynamic value' }
@AkkumBakkum-m5h
@AkkumBakkum-m5h 6 ай бұрын
i think jaldbazi mei sir bhool gye
@VivekSharma-ef1um
@VivekSharma-ef1um 6 ай бұрын
@@shaharyaransari4887 thanks man it woked
@rizwansaifi3590
@rizwansaifi3590 8 ай бұрын
7:02 the issue with the object property "first name" when trying to access it as (object.first name ) is because of space , if the property name was "first" then in that case it is easily accessible as object.first or object["first"] both will work . As any property name is coerced as string
@KoushikBiswas-jo7iy
@KoushikBiswas-jo7iy 7 ай бұрын
Yes both should work.
@devendralade-m5p
@devendralade-m5p 2 ай бұрын
@@KoushikBiswas-jo7iy yes both will work .
@CodeWithDhruv-sy5bs
@CodeWithDhruv-sy5bs 11 ай бұрын
The reason of undefined is because the greeting function is not returning anything it is just priniting thats why the return type is undefined
@shashankkumarpandey4184
@shashankkumarpandey4184 Жыл бұрын
15:00 , you are using console.log(console.log()) thing thats why undefined coming, just like python when you do print(print("Hi")), it gives hi then none. print statement inside print statement. i don't know if my logic is correct but i can think of this only right now.
@lokinagure
@lokinagure 11 ай бұрын
Bilkul sahi he.
@mantra_youtube
@mantra_youtube Ай бұрын
15:12 Console.log(jsUser.greeting()) answer ( undefined ) ❌ jsUser.greeting() Answer ( "Hello js user") ✅ Undefined remove 😁
@EyeGuy2766
@EyeGuy2766 4 ай бұрын
7:12 the error is because you have given space between "full name" if you write "fullname" or "full_name" then it is accessible using dot method also
@Godxxillaa
@Godxxillaa Ай бұрын
13:53 In your function, you did not explicitly return any value. Therefore, when you call the function within console.log(), it prints 'undefined' because that's the default return value for functions that don't have a return statement.
@mohiturkade2612
@mohiturkade2612 Күн бұрын
The best JavaScript playlist available on the internet 🤗
@tech_channel110
@tech_channel110 Жыл бұрын
Best video on internet Shandar lecture Keep making such an amazing video lecture for us These lectures are very helpful for us
@kazitanim007
@kazitanim007 Жыл бұрын
When u call the function directly instead of console.log - "undefined" doesn''t show on the console.
@iscoD1sco
@iscoD1sco 4 ай бұрын
@15:00 The reason you see undefined is because the greeting() method in this code doesn't return any value explicitly. In JavaScript, when a function doesn't have a return statement, it implicitly returns undefined.
@iam_mausam
@iam_mausam 4 ай бұрын
undefined is bcz in greeting function we already had console.log('message') ...but while calling the function you used console.log(greeting()) again. due to to console.log() we are getting an undefined. Just write gretting() and there will be no undefined.
@Prakash-z8p
@Prakash-z8p Жыл бұрын
omg i've seen such a high quality oontent like this on yt , i'm just getting jealous that many people can have access to this video and they'll be getting more info....damnn bro,this playlist is lit
@supernovaveda211
@supernovaveda211 7 ай бұрын
10:20 me jo sir , key ka syntax shi kiye hai taki uska type symbol aa jae. Lekin syntax shi krke firse check kiye to type string hi hai.
@nitin_diwakar01
@nitin_diwakar01 6 ай бұрын
same problem
@sara..5535
@sara..5535 4 ай бұрын
+1
@kislay-y9f
@kislay-y9f 27 күн бұрын
00:05 Objects are an important concept in JavaScript 02:00 The approach is to create an object and assign values to it. 03:54 You can access object values in JavaScript using dot notation or square brackets. 05:51 Understand the output of printing values 07:53 To declare a symbol and add it to the keys of an object, use square brackets 10:10 Syntax error caused rejection in interview 12:08 Understanding symbols and keys in Python 14:11 Creating a greeting function and understanding object freezing 16:12 Introduction to objects and their properties 17:56 Mastering scripts enables successful interviews Crafted by Merlin AI.
@swarn6402
@swarn6402 4 ай бұрын
15:00 --> We don't have to use the print statement console.log(JSUser.greeting()) because it will print and then return "undefined". Actually, the function itself is already printing the greeting, so we just need to call it instead of printing it again.
@NiteshChaudhary07.
@NiteshChaudhary07. Жыл бұрын
Mene bahut video's dekhi par maja nahi aya apki video dekhta hu to sach me apke video's achhe lagte he aur helpfull he thank you
@JavidSumra786
@JavidSumra786 Жыл бұрын
Sir I think greeting function giving undefined because of we are printing this function so it expect some value
@KrishnaArt13
@KrishnaArt13 Жыл бұрын
console.log("=======jsUser.greeting()====",jsUser.greeting()); console.log("=====jsUser.greetingTwo()======",jsUser.greetingTwo());
@vlogs4u968
@vlogs4u968 Жыл бұрын
Thank you sir ji main thoda research kiya ki KZbin pr available js ki jyadatar playlisto pr really sir ji sabse alak hai aapki playlist concept ko apne alak hi tarike se bataya hai bahut bahut dhanyavad sir ji
@DEEPAKKUMAR__ECC
@DEEPAKKUMAR__ECC 3 ай бұрын
singleton: jab *constructor* banega tab, na ki jab *literals* banenge tab 7:07 to access values inside objects: eg. JsUser.email or JsUser["email"]
@contraspower6302
@contraspower6302 3 ай бұрын
Haa bhai wahi i think glti se galt boldiya
@kaushalTechFun
@kaushalTechFun 27 күн бұрын
I think Here is undefined is because one from greeting method, second thing from where in which console greeting method is called, means double console,(inside one console is sub console)
@munawarminhas7982
@munawarminhas7982 Жыл бұрын
in my case also there is 12:29 am haha,,, you are doing great sir, I eagerly await the backend series.
@chaiaurcode
@chaiaurcode Жыл бұрын
Kya din, kya raat. Agr mza aa rha to kaam krenge hi
@munawarminhas7982
@munawarminhas7982 Жыл бұрын
sir the best thing is that we never get bored by your videos,, main ny bht sary courses starrt kiye is sy phly but end kbhi nahi hua koi bhi , but jb sy apka js course dekhna start kiya hai aj 35th video hai within one week,almost 4-6 hours+ daily screen k samny gzr jaty hain time ka pta nahi chlta ,smj b aa jati or practice b ho jati@@chaiaurcode
@zohaibshahzad4567
@zohaibshahzad4567 Ай бұрын
For those wondering about undefined . Its is comming beacuse the function is called in console.log and function it self is not returning anything .
@shashankmishra9014
@shashankmishra9014 8 ай бұрын
undefined @15:10 is due to the fact that console.log print what is returned when so in this case when greeting is used nothing is returned so fun returns undefined which is printed.
@ManishGupta-qd8fl
@ManishGupta-qd8fl 6 ай бұрын
'undefined' is shown , because we call the method in console.log(jsUser.greeting()) and we console also in greeting method. It will removed if we directly call method without console. eg; jsUser.greeting()
@ejdknrknfrnfjnrjfn
@ejdknrknfrnfjnrjfn 10 ай бұрын
*Sir really React complete karney kay baad dekh raha ho concepts ko clear karney kai liyay ab samjh araha hai in depth course ka matlab😃*
@saadkashif880
@saadkashif880 10 ай бұрын
same bhai react course complete kia hay or ab ye dekhna start kia or boht maza aaraha
@Scarlett_firz
@Scarlett_firz 3 ай бұрын
Kha se kiya react course?? Aur bina js ke smjh aa jayega react?? Mai bhi soch rhi react shuru krne ka
@ejdknrknfrnfjnrjfn
@ejdknrknfrnfjnrjfn 3 ай бұрын
@@Scarlett_firz js basic ani chahiyay and react ka course chai or code sai hi kia best hai all over youtube
@YamrajShrestha
@YamrajShrestha Жыл бұрын
I've been fortunate to have incredible guidance on my journey to becoming a full-stack programmer. Learning with the help of this amazing tutorial, I've been steadily mastering JavaScript, and it's been an enlightening experience. A big thank you to my learning companion for being there every step of the way.
@zaindev31
@zaindev31 Жыл бұрын
hh
@zaindev31
@zaindev31 Жыл бұрын
kkk
@HafizAhmedNadeem-g4e
@HafizAhmedNadeem-g4e 6 ай бұрын
@7:02 you can also access by dot method let a={ "name":"ahmed", 'age':20} console.log(a.name) // ahmed console.log(a[name]) // ahmed conclusion: if you give "key" in string or without string it wiill access by both two methods
@sahilgupta7001
@sahilgupta7001 9 ай бұрын
the function was showing undefined because you logged a function which was not returning anything, how could you not get this simple thing
@nivilsangwan7352
@nivilsangwan7352 10 ай бұрын
his eyes have that dark thing around them indicating the tiredness. BTW I am loving your videos and I am actually a 9th grade student and am able to understand almost everything. This course is better than any other course I've seen on YT. Thank You Sir.
@cherishkansara7851
@cherishkansara7851 10 ай бұрын
Sir woh last mein undefined isliye araha hai kyuki function Console log kar raha hai na ki kuch return kar raha hai or an function ko console log mein print karwa rahe hai toh isliye undefined araha hai
@mohitchand8004
@mohitchand8004 7 ай бұрын
In symbol [10:36] even when we use square brackets than also the typeof is returning string. Can anybody explain me this
@bharti_1472
@bharti_1472 7 ай бұрын
I've the same question.
@SubtainHameed
@SubtainHameed 2 ай бұрын
Hy Sir, Hope you are fine Amazing JS series But some points you have to clear jab ham objects ko perh rhe he or functions wala topic abhi start ni kia to ap object me function ki examples q de rhe he jab eik beginar ko function ka pata hi ni syntax ka to hame abhi just objects perhny chahiye after read function then hame is terha ki examples kerni chahiye Thanks Sir
@0xfawazali
@0xfawazali 6 ай бұрын
@ 14.46 It gives undefined as we did not use return keyword there. If we use return it will not print undefined.
@saffronrepublic6632
@saffronrepublic6632 3 ай бұрын
maa kasam maja aa gya ek number explaine 😃
@md.abidullahmuhib
@md.abidullahmuhib 9 ай бұрын
Hi there, in this lecture we are getting undefined because we are executing a function inside console.log();. By executing JsUser.greeting(); we are printing "Hello JS user". And the execution value of JsUser.greeting() = undefined. Which we are printing by console.log(JsUser.greeting());. Waiting for a reply. Correct me if I am wrong. Love from Bangladesh 🇧🇩 .
@codethics4033
@codethics4033 9 ай бұрын
@10:09 the methode that you told still shoing that in string even i dicleared it correct way .
@GazzyYT69
@GazzyYT69 8 ай бұрын
same problem
@shantanu_saraf
@shantanu_saraf 2 ай бұрын
kya baat hn sir, what an explanation!..
@biswaranjansahu66
@biswaranjansahu66 11 ай бұрын
There are no words for your teaching skill and knowledge sir.
@lovetriangle3232
@lovetriangle3232 9 ай бұрын
Thankyou for theamazing video sir but at 17:05 ,the output undefined occurrs bcoz in the line no 38 you used console.log to print a function(jsuser.greeting()), function directly excute when it called just by jsuser.greeting(),why we need to write console.log(jsuser.greeting()). i guess you miss that part sir.
@WatchNotchK2S
@WatchNotchK2S 11 ай бұрын
Sir , JsUser.greeting(); should be used to call the function and print the value in it. as you console.log(JsUser.greeting()) & console.log(JsUser.greetingTwo()); it want function to return a value and give the answer , thus you get udefined in the browser ( Correct me if i am wrong )
@Bca.Wallah
@Bca.Wallah 10 ай бұрын
This is literally The best javascript playlist on KZbin. Hope the way you guide the students will truly bring a revolution. Lots of love Sir😍❤❤
@Birdscare4327
@Birdscare4327 7 ай бұрын
Buhat achy sy apny explain kra Hai,🥰
@lokinagure
@lokinagure 11 ай бұрын
Namaste Sir ji, In the Video code, JsUser.greeting() logs the message "Hello JS user" to the console but doesn't return anything. When you log the result of JsUser.greeting(), it prints undefined because the function implicitly returns undefined in the absence of a return statement. function ke andar ka log message print karta he, but kuch bhi return nahi karta he, phir bhi ham function call karte wakt log kiya to kya karega function bichara undefined hi return karega na!
@lokinagure
@lokinagure 11 ай бұрын
Loving your art of teaching and adating myself. Youre awesome Sir ji.
@kantachourey
@kantachourey 4 ай бұрын
18 ki age me etni kamyabi achieve kr li are i am very proud of you engineer sir
@shanksiuu
@shanksiuu 11 ай бұрын
15:00 maybe it's becuz of the absence of return value JsUser.greeting = function(){ return "Hello JS user"; } JsUser.greetingTwo = function(){ return `Hello JS user, ${this.name}`; } console.log(JsUser.greeting()); console.log(JsUser.greetingTwo()); OR function jsUser (name) { console.log(`Hello JS user, ${name}`) } jsUser("Hitesh")
@BitFire007
@BitFire007 10 ай бұрын
"Chai aur Code, you've successfully turned me into a JavaScript enthusiast. Your tutorials are gold!"
@CentristPerspective
@CentristPerspective 3 ай бұрын
Correction: In Javascript,Objects created using the literal notation are singletons, but objects created using a function constructor are not.
@contraspower6302
@contraspower6302 3 ай бұрын
Yeah i also got confused by that
@chilloutchords
@chilloutchords 6 ай бұрын
sir woh undefined isiliye aaya kyu ki woh function kuch return nahi kar raha aur apne usee console.log() kara hai
@thebusinesspostt
@thebusinesspostt 9 ай бұрын
Can anyone help me how to access ARRAY inside objects using bracket notation ?
@Chapterbychapterz
@Chapterbychapterz 10 ай бұрын
@6:55 its giving access by full name by using dot
@contraspower6302
@contraspower6302 3 ай бұрын
Sir on google and chatgpt it is telling "object created by object literal are singleton" but @ 1:27 u said constructor se singleton hota h sir idhr confuse hogya plz clear krdo🙏🙏
@Abhinav-ep7vb
@Abhinav-ep7vb 7 ай бұрын
Gold Js Content ON YT . keep Creating more content sir
@shivamkumar-i1j3s
@shivamkumar-i1j3s 8 ай бұрын
15:09 ye undefined line 34 se aa raha h qki at line 30, function greeting is not returning anything.
@amansayer4943
@amansayer4943 Жыл бұрын
15:15 We are not returning to print it, we just need to call the function with object name ex: User.greeting();
@MCA_HimanshuSeth
@MCA_HimanshuSeth Жыл бұрын
yeah & the point is that , the function doesn't return any value that is why it is printing undefined
@prasadpatil9329
@prasadpatil9329 24 күн бұрын
sir you use console.log on jsUser.greeting function i.e. it takes undefined when you use console.log in replace with when use return then you dont get undefined is it correct or not plz explain
@robot6716
@robot6716 7 ай бұрын
@17:09 undefined in console becuase at line number 37 and 38 in console log greeting() and greetingTwo function are called a which do not return anything explicitly and by default "undefined". is returned.
@sufigaming135
@sufigaming135 4 ай бұрын
when we create an object using constructor method we have to mention the object as a singleton otherwise it will behave similar to literal object and we can make multiple instances out of it
@contraspower6302
@contraspower6302 3 ай бұрын
Bhai thoda smjha do plz
@dishaa8
@dishaa8 12 күн бұрын
const is used for constant which means their value can not be changed then in this how we change value of symbol at 10:25
@pushpendrasingh777
@pushpendrasingh777 9 күн бұрын
We the use of const is that the reference to that symbol not the value stored in that symbol
@krishnaanandiswaraa
@krishnaanandiswaraa Жыл бұрын
im sorry to say sir , but problem , you alwasy said that , you explain in depth , but here in object sometime in vedio you type some syntax but dont explain them
@apnipathshala7866
@apnipathshala7866 Жыл бұрын
You can't learn objects is just 19 mins...you have to give 1 to 2 week for this... practice Vdo is only to take an overview of objects
@abirroy1978
@abirroy1978 Жыл бұрын
Bro If you want to depth understanding please go search harsith vasisth javascript full length video you will get depth in every thing..
@Bca.Wallah
@Bca.Wallah 10 ай бұрын
Bhai If you really want to learn JavaScript, you will have to work hard yourself. Read documentations. as sir says in all the lectures. Because there is no concept of spoon feeding here. hope all your doubts are cleared.
@V2.The.Great.F
@V2.The.Great.F 10 ай бұрын
Objects in javasript.... Thuje objects hee patga nahi tho kya faidha bhai.. OOPSnahi patha hai kya??
@GOJOANDSUKUNAFAN
@GOJOANDSUKUNAFAN 6 ай бұрын
Yea you all are glazers he doesn't explain shit
@gauravmangal5191
@gauravmangal5191 8 ай бұрын
Two things, Primarily the undefined you were getting was because you were trying to print the output of the greeting function and since it returned nothing you got "UNDEFINED". Secondly, when I am printing the typeof obj[symbol] its printing undefined. IDK if its supposed to be this way or not. If anyone have time can you elaborate a lil.
@siddharthrathore-lb8su
@siddharthrathore-lb8su 7 ай бұрын
for me obj[symbol] is printing string. Maybe you should check your code for any typo.
@Mahin_katariya
@Mahin_katariya 9 ай бұрын
As of 2024 the part where sir wrote at 6:33 " fullname " : " hitesh choudhary " and while we were trying to access it using the dot method it wasn't accessing but now we can access it using the dot method.✅
@Saumyadip07
@Saumyadip07 9 ай бұрын
Hello @Hitesh Sir, I think undefined in the last , is coming from console.log(). If we write JsUser.greeting() only then undefined will not show
@amankishore8843
@amankishore8843 20 күн бұрын
Objects key are always of string data type while value are of other types.
@milindchaturvedi9770
@milindchaturvedi9770 10 ай бұрын
The best series on the internet !
@All-about-lea_rning
@All-about-lea_rning 7 ай бұрын
the reason of undefined kyu ki aap ne function me console kiya hai aur execute ke time per bhi aap console kar rhe hai ya to execute ke time console mat kijiye ha to function me se console ko hata ke return kardo
@AbdulHameed-to3sg
@AbdulHameed-to3sg Жыл бұрын
no doubt sir you are great teacher
@SuryaKarigar
@SuryaKarigar Жыл бұрын
Wow [ ] can take my job 😂😂 I better need to be ready for Interview Sir. It’s creating fear and confidence at the same time
@babarshabbir2554
@babarshabbir2554 8 ай бұрын
"Excellent tutorial, covers JavaScript objects' depths neatly! Loved the chai tea and code puns. #JavaScript" Note: This comment is written in Hindi script, which would look like - "पर excellant ट्यूटोरियल है, सक्षम JavaScript objects की depths निग्रानी करता है! Chai tea और code शब्दों से प्यार लगाया। #JavaScript"
@tirth244
@tirth244 5 ай бұрын
Symbol me bracket karne ke baad or access me karne ke baad bhi ushka type string hi aa raha hain
@shivanshsharma4916
@shivanshsharma4916 Жыл бұрын
15:04 undefined aa raha because greeting() is not returning any value , use return keyword to avoid that
@AnkitPandey-jo4ye
@AnkitPandey-jo4ye Жыл бұрын
maira erroe aa raha hai jsuser.greeting si not a function
@mtex448
@mtex448 Жыл бұрын
@@AnkitPandey-jo4ye you need to add ()
@ViralBabuaa
@ViralBabuaa 5 ай бұрын
7:05 apne kaha ki agr "name" : "mohit " console.log(jsUser.name) accept kar raha hai koi error nhi show kar Raha hai kyu Lekin agr mai "full name ": "mohit kumar" isko agr (JsUser.full name) de raha hu tab error show kra raha hai kyu ...????
@shivamdubey5688
@shivamdubey5688 3 ай бұрын
use square bracket instead of dot
@rajatkatal9311
@rajatkatal9311 9 ай бұрын
appko 34th line pr console log nhi krna tha ye usika "undefined" aa rha hai. usse direct call krte to sirf ek baar print hota woo...
@photosofmine3443
@photosofmine3443 5 ай бұрын
SUMMARY : Object name = { keyname1: value, keyname2: value } 1. To declare object there is two method. Object literals and Object constructor(singleton). 2. To declare symbol in object use [ ] on keyname . 3.To freeze/lock an object = Object.freeze(object name). 4.To access object use objectname.keyname and it is called dot notation. 5. Use [key name] notation to access object key with special characters and it is called bracket notation.
@sanjoyal-world_07
@sanjoyal-world_07 Жыл бұрын
Guru jee ..next video upload kijiye js chapter 49 k baad se ...
@Run-towards-Allah
@Run-towards-Allah 3 ай бұрын
Sir u r saying that { } is object but when we check the data type of array [ ] it's also object
@mrinvisible4095
@mrinvisible4095 11 ай бұрын
10:31 Sir, to use Symbol as a key, what if we use Map data structure!?
@muhammadraza8181
@muhammadraza8181 4 ай бұрын
property type still string rhty as symbol use krna k bawjood. Symbol mn ku ni change hoty?
@bngdtutorial2947
@bngdtutorial2947 9 ай бұрын
when i am writting jsuser.greeting(); then it simply printing the result but, while writting console.log( jsuser.greeting()); then it printing the result along with undefine. It may due to we are not returning any value and still trying to console.log() .
@vtechcoding
@vtechcoding 7 ай бұрын
undefined iske liye kyuki function ko aapne call kiya inside console.log but function se kuch return nahe ho rha
@AkkumBakkum-m5h
@AkkumBakkum-m5h 6 ай бұрын
all the comments solve my residual doubts thank you guys
@harishankarthakur388
@harishankarthakur388 Жыл бұрын
This series is very addictive❤
@ShudhanshuShree
@ShudhanshuShree 11 ай бұрын
undefined is coming because the function greeting and greetingtwo is not returning anything and you are printing the output inside console.log(greeting());
@AnishKarchuli
@AnishKarchuli Жыл бұрын
Sir, I have some doubts. I am able to access full_name with a dot. We can't access it if we provide space between full and name. But usually, the key is declared without spaces. At 10:32, the typeof of [mySym] is also string. Although we put it in a square bracket, it is not showing as a symbol. Can you explain that?
@zahidsarang2999
@zahidsarang2999 Жыл бұрын
console.log(typeof (JsUser[mySym)) is giving string Because the value you've assigned to the Symbol key in the JsUser object is a string So, when you fetch the value of this key and check its type, it tells you it's a string. and if you pass like this const mySym = Symbol("user1"); const JsUser = { [mySym]:mySym,} now it will give typeOf Symbol
@MuhammadAbbas-m-6442
@MuhammadAbbas-m-6442 Жыл бұрын
If you want to determine that the property uses a Symbol key, you can check the property keys of the object and see if any of them are Symbols. Here's an example of how you can do this: if (Object.getOwnPropertySymbols(obj1).includes(mySym)) { console.log("the property has a Symbol key."); } else { console.log("the property does not have a Symbol key"); }
@armorkinggaming1933
@armorkinggaming1933 Жыл бұрын
it will show type as 'undefined' instead of symbol
@adnanahmad1234
@adnanahmad1234 Жыл бұрын
@@zahidsarang2999 Thanks dear. It worked !!
Objects in Javascript part 2 in Hindi | chai aur #javascript
17:43
Chai aur Code
Рет қаралды 217 М.
Learn JavaScript OBJECTS in 7 minutes! 🧍
7:01
Bro Code
Рет қаралды 81 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
Functions and parameter in javascript | Hindi
19:14
Chai aur Code
Рет қаралды 262 М.
Watch this before building coding projects
17:07
Chai aur Code
Рет қаралды 74 М.
Functions vs Classes: When to Use Which and Why?
10:49
ArjanCodes
Рет қаралды 173 М.
An Encounter with JavaScript Objects
10:38
Fireship
Рет қаралды 148 М.
Learn Coding & Get a Job (in 2025) 🔥
16:54
CodeWithHarry
Рет қаралды 705 М.
The JavaScript Survival Guide
14:47
Fireship
Рет қаралды 739 М.
Javascript Objects Explained | Javascript Objects Tutorial
23:17
Pick these tech to make or destroy your tech career
15:52
Chai aur Code
Рет қаралды 151 М.
Array in Javascript | chai aur #javascript
18:55
Chai aur Code
Рет қаралды 278 М.
JavaScript for the Haters
2:50
Fireship
Рет қаралды 1,6 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН