Objects in Javascript part 2 in Hindi | chai aur

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • Visit chaicode.com for all related materials, community help, source code etc.
    #javascript #hindi
    Sara code yaha milta h
    github.com/hit...
    Discord pe yaha paaye jaate h:
    hitesh.ai/discord
    Instagram pe yaha paaye jaate h:
    / hiteshchoudharyofficial

Komentáře • 206

  • @avibirla9863
    @avibirla9863 Před rokem +114

    This js series is so addictive...Im watching this series for hours just like netflix..... Hitesh sir you are awesome 💯 teaching the concept with such dept and clarity and covering minute minute imp interview problems is cherry on cake 🔥❤️

    • @chaiaurcode
      @chaiaurcode  Před rokem +25

      Thanks. More to come today

    • @DilipKumar-zp7jg
      @DilipKumar-zp7jg Před rokem +10

      ​@@chaiaurcode can u explain singleton in detail i think u missed how to use constructor

    • @sravanakirtana2787
      @sravanakirtana2787 Před 7 měsíci +3

      Absolutely true. Binge watch. Awesome tutorial

  • @ayush.tiwarios2105
    @ayush.tiwarios2105 Před měsícem +3

    00:02 In this video, we will talk about creating singletons and constructors in JavaScript objects.
    01:56 Giving unique IDs to standard and regular users in Javascript
    04:03 Accessing and nesting objects in JavaScript using dot notation
    05:53 Combining objects in Javascript
    07:55 Object.assign() copies all properties from multiple source objects into a target object.
    09:58 Using spread operator for object cloning in JavaScript
    11:57 Accessing and manipulating object values in JavaScript
    13:54 Objects in JavaScript can be manipulated and accessed using various methods.
    15:52 Understanding properties and methods in JavaScript objects
    17:40 Understanding big objects in JavaScript

  • @quickSilverXMen
    @quickSilverXMen Před rokem +12

    @0:20 begining
    @5:13 optional chaining
    @5:52 combining objects 🔻
    {
    @11:09 spread operator
    @13:50 accessing all keys of object (important)
    @15:34 hasownProperty (to check if the key is there )
    }

  • @user-rn2pv8lh1z
    @user-rn2pv8lh1z Před 2 měsíci +5

    really first j/s series hai jisme mja aarha hai👌👌

  • @guitargig123
    @guitargig123 Před 6 měsíci +2

    Series started very simple but now started getting intense, getting into more depth. Thank you

  • @HydroJudge
    @HydroJudge Před 11 měsíci +2

    Sir iss se pehle wala lecture Symbol and this keyword and square notations as well as using double quotes for key names it was really out of the box. Bohot bohot dhanyavaad sir

  • @tarunsoni2443
    @tarunsoni2443 Před 8 měsíci +1

    I would like to share my observation as well...
    let Obj1 = { 1: "a", 2: "b" };
    let Obj2 = { 3: "c", 4: "d" };
    let Obj3 = { ...Obj1, ...Obj2 }; //Here I have used spread operator but in order to access I need to use []
    let Obj4 = Object.assign({}, Obj1, Obj2); //Best practice beacause it would not change the source object (Obj1)
    //let Obj4 = Object.assign(Obj1, Obj2); //Bad practice
    console.log(Obj1); //It make changes in target Object as well.
    Thanks a ton sir!

  • @furqanbaber5326
    @furqanbaber5326 Před 10 měsíci +1

    I am watching this playlist from Pakistan and your teaching way is Amazing ❤❤❤ God bless you

  • @ThelookAt
    @ThelookAt Před rokem +6

    That's good sir🎉🎉❤ after completing pw skill lecture this is literally very helpful

  • @_coding_santa
    @_coding_santa Před 11 měsíci +2

    best teacher everrrr evryone try to coverup quickly but this guy .....lovee

  • @mr.researcher1525
    @mr.researcher1525 Před rokem +4

    Thank..u...back..again. Plz.. continue..the..whole..series.plz..🤗

  • @codinghero2001
    @codinghero2001 Před 11 měsíci +3

    The Best JS series on CZcams.. Thank you so much!!!!!

  • @babarshabbir2554
    @babarshabbir2554 Před 3 měsíci

    "Excellent explanation of objects in JavaScript, with clear examples and real-world application. Highly recommended!" #javascript #chai

  • @akashmapari1127
    @akashmapari1127 Před rokem +3

    I don't have words to say about this series I'm so addicted . Before this series i hate javascript I don't want to learn but now i am waiting for new video please post new video as soon as possible thank you sir you are doing great work 💯❤

  • @tayyabsami258
    @tayyabsami258 Před 2 měsíci

    Giving an Empty object as a target will not modify the value of obj1 , if we donot give the empty object as target then It will consider Obj1 as target and the value of Obj1 will be modified.

  • @pulkitgoyal8685
    @pulkitgoyal8685 Před 6 měsíci

    i think at 10:30 obj3=Object.assign({},obj1,obj2) create new space for obj3 so change in obj3 dont make any change in obj1. but in (obj1,obj2) make obj3 and obj1 connected

  • @Code..188
    @Code..188 Před 5 měsíci +1

    Best series of js ❤

  • @soumadip_skyy_banerjee
    @soumadip_skyy_banerjee Před rokem +2

    What's that whistle in the BG? Night Watchmen/Caretakers? .. Bdw.. Lovely series 👌🏻

    • @chaiaurcode
      @chaiaurcode  Před rokem +1

      Thanks, I guess that video was recorded around 3-4 am, so probably night watchman

  • @user-vj2fr1iq4b
    @user-vj2fr1iq4b Před 5 měsíci

    Best series for learning js sir I appreciate you very much.

  • @kamitp4972
    @kamitp4972 Před 4 měsíci

    One of the best free resource on Yt without any doubt

  • @ramjipal9706
    @ramjipal9706 Před 2 měsíci

    const obj1 = {
    name : "super",
    sir : "mane"
    }
    const obj2 = {
    name :"spider",
    sir: "man"
    }
    const obj3 = {...obj1, ...obj2}
    console.log(obj3)
    this will print:
    name: "spider", sir: "man"
    as the latest value is updated if key is same

  • @vaibhavilohani3421
    @vaibhavilohani3421 Před 8 měsíci +2

    Sir your teaching skills are awesome!!Thanks so much for this tutorial!!

  • @manemanoj3068
    @manemanoj3068 Před rokem +1

    Literally learn new concept here....

  • @tech_channel110
    @tech_channel110 Před rokem +1

    world class series of javascript

  • @walkingalonewithyusuf9987

    Best teacher in YT

  • @user-sz3wl8nk5d
    @user-sz3wl8nk5d Před měsícem

    at 8:19 is it correct
    const obj1 = {1:"a",2:"b"}
    const obj2 = {3:"a", 4:"b"}
    const obj3 = {...obj1,...obj2}
    console.log(obj3)

  • @baitullahkhan5030
    @baitullahkhan5030 Před rokem +1

    i can hear the whistle by the guard i think 😂
    it is midnight
    thanks sir

  • @mansisrivastav2975
    @mansisrivastav2975 Před 10 měsíci

    having chai while watching your videos is too much fun to learn...

  • @Ssa-2128
    @Ssa-2128 Před 6 měsíci

    Seriously sir ,ur way of teaching technique is just drop dead gorgeous 🥰💞

  • @Vijay-ih7cv
    @Vijay-ih7cv Před rokem +1

    Hitesh Bhai you are awesome ❤

  • @photosofmine3443
    @photosofmine3443 Před měsícem

    SUMMARY :
    1.To declare singleton object => new Object( );
    2. To merge object use spread operartor. {...Obj1, ...Obj2 } or
    Object.assign( { }, obj1,obj2 ):
    3. To return keys from object => Object.keys(object name);
    4.To return values from object => Object.values(object name);
    5.To check property of object => Object.hasOwnProperty(key/value name);

  • @siddhimaharana5602
    @siddhimaharana5602 Před 7 měsíci

    This could have took me a whole year to understand until discovering your playlist❤❤🙏

  • @dev_kongkon
    @dev_kongkon Před rokem +4

    From Bangladesh. Etna premium content muje ab tag mila nahi.

  • @AyushJain128
    @AyushJain128 Před 6 měsíci

    really best javascript eries keep going on sir you are the one of the best teacher in my life

  • @shreshthagupta7771
    @shreshthagupta7771 Před rokem +2

    At 13:00 you are actually accessing second object from array if you write user[1]

  • @BitFire007
    @BitFire007 Před 6 měsíci

    "Major shoutout to Chai aur Code for being the beacon of light in my JavaScript learning journey!"

  • @sandipanpasari7017
    @sandipanpasari7017 Před měsícem

    console.log(Jsuser.greeting());
    console.log(Jsuser.greeting2());
    undefined was there becuase u were using console.log and then calling the function
    Jsuser.greeting(); // in this case undefined will not be there as we are just calling the function

  • @soahibasif659
    @soahibasif659 Před 4 měsíci

    best javascript course ever made

  • @ankitsainiofficial777
    @ankitsainiofficial777 Před 8 měsíci

    I don't have words to say about this series I'm so addicted

  • @qaiserhameedkhan8147
    @qaiserhameedkhan8147 Před 6 měsíci +1

    Boht Achi Series h Sir

  • @pranjalgogoigaming-1209
    @pranjalgogoigaming-1209 Před 9 měsíci +1

    Best Object video

  • @YCODIES
    @YCODIES Před měsícem

    object.assign or destructuring which is good approach

  • @sadiakhan5371
    @sadiakhan5371 Před 22 dny

    9:23 there were two b , b:2 and b:4 but in expected output only b:4 is mentioned where is b:2 ?

  • @beingwomenwithaashu8836
    @beingwomenwithaashu8836 Před rokem +3

    Sorry for the comment but I am waiting for this series more than Netflix. By the way I am not habitual for Netflix or Amazon Prime. I will try to complete this series Maybe next week. I just want to ✍️ line the way of your teaching is ❤. Thank you. I already subscribed to those channels also where you are teaching

  • @anuraggupta1008
    @anuraggupta1008 Před 6 měsíci

    deep understanding of javascript object now love chai aur code

  • @vishalraut265
    @vishalraut265 Před rokem +1

    Very helpful video thanks 🙏

  • @rajshekharmishra9151
    @rajshekharmishra9151 Před 6 měsíci

    it's all thanks to your hardwork sir i am able to see why js is an amazing language , please keep up the good work

  • @user-mo1sy5ck7r
    @user-mo1sy5ck7r Před 6 měsíci

    best Series ALL OVER UNIVERSE, thank you Sir 🙏

  • @Anees_Coding
    @Anees_Coding Před 5 měsíci

    If the keys of both objects are the same, the spread operator is producing unexpected output.

  • @user-lq6fs1nb1i
    @user-lq6fs1nb1i Před 9 měsíci

    you are providing the realtime content which will surely use in our projects when we will get in any company, not only the bookish knowledge but the things from your own experience. this is great bhai. you are pure gem of teaching. i never see this type of content anywhere , this is the best tutorial someone can ever have. Thank you so much .

  • @shoaibsaifi5292
    @shoaibsaifi5292 Před 26 dny

    Asli Gyaan Yahan milta hai 💥

  • @_Sujit-khot_
    @_Sujit-khot_ Před 10 měsíci +1

    now i know objects really well

  • @gauravmoreshwar1727
    @gauravmoreshwar1727 Před 7 měsíci +2

    So addictive ❤

  • @allaboutgames2244
    @allaboutgames2244 Před 2 měsíci

    best series blessings from pakistan

  • @user-dw8dj3tr1t
    @user-dw8dj3tr1t Před 4 měsíci

    best teacher till now

  • @khushpun7897
    @khushpun7897 Před 6 měsíci

    best javascript course ever made 🔥

  • @icebear5654
    @icebear5654 Před 3 měsíci

    weren't we supposed to initialize const variables?

  • @natureslove2938
    @natureslove2938 Před 2 měsíci +1

    thanks sir👍👍

  • @rohanmaiti7013
    @rohanmaiti7013 Před rokem

    absolutely mind blowing video ..just love it

  • @sonukachhap6237
    @sonukachhap6237 Před měsícem

    Hanjiiiiii maja aaa raha hai series ko complete karna ka

  • @Mranimater_0
    @Mranimater_0 Před rokem

    ❤❤❤❤❤ you are a good programmer you always clear all doubts easily

  • @shiva_gaming8122
    @shiva_gaming8122 Před 7 měsíci

    one of the best javscript playlist.

  • @mrHock86
    @mrHock86 Před 3 měsíci +2

    continuining day 5: Ojects part 2

  • @Vardanaggarwal
    @Vardanaggarwal Před 3 měsíci

    Amazing and indepth series.

  • @rohitbhadauriya7227
    @rohitbhadauriya7227 Před 4 měsíci

    @hitesh sir isko spread operator bi assign kr skte the hum to assign ku kiya ye doubt h mera

  • @softheartpeople
    @softheartpeople Před 11 měsíci

    it's just really unbelievable. Thanks mentor

  • @Yuvraj-Singh577
    @Yuvraj-Singh577 Před 7 měsíci

    Best Teacher of JS❤

  • @NaveedGAiE
    @NaveedGAiE Před 3 měsíci

    This is very awesome series

  • @debabratabhunia8724
    @debabratabhunia8724 Před 5 měsíci

    Sir, const obj1= new Object(); is not a Singleton object

  • @sharangpatel2015
    @sharangpatel2015 Před 11 měsíci

    'Target' in object.assign() implies that in which object we want to add the new object.
    In short We can add these values to an empty object as well in the existing object too.

  • @suvadipghosh1385
    @suvadipghosh1385 Před 4 měsíci

    Fantastic video...great learning

  • @yourclips1034
    @yourclips1034 Před 11 měsíci

    Sir, mujhe logic building sikhna hai but sikh nahi pa raha hu kyu ki koi video me samjh hi nahi a rha hai kkse structure banau kaise logic plant samjh nahi ata or product level par koi project sikhao sir, sath me interview bhi nikal jaye

  • @user-nw6hb5xy9b
    @user-nw6hb5xy9b Před 11 měsíci +1

    types of addicition - in morning - chai aur code , in evening - hitesh choudhry (sir).

  • @user-nw6hb5xy9b
    @user-nw6hb5xy9b Před 11 měsíci

    i am very thankful to you , for creating such a good series . i had a joined a paid course , but they went with the course pattern , but after watching your series , all my doubts are cleared . You are an inspitration to me sir . your teaching skills are more than the paid courses .
    thanks sir
    👏👏👏

  • @JiteshSalunkhe001
    @JiteshSalunkhe001 Před rokem

    sir kya hum array me jo flat(infinity) use kiye the vo object k elements k liye use kr skte he . instade of
    (regulurUser.fullname.userfullname) . i tryed but not work .

  • @rjsuraj1205
    @rjsuraj1205 Před 11 měsíci

    hey can anyone explain as Sir said constructor creates singleton objects , But constructors are used to create instances of objects, not specifically singleton objects.I am confused can anyone explain

  • @misbahsiddiqui9365
    @misbahsiddiqui9365 Před 11 měsíci

    Sir your playlist is Supercalifragilisticexpialidocious!!!!!

  • @user-bm2dg5jy2t
    @user-bm2dg5jy2t Před měsícem

    it serise is next level

  • @FaizSultan430
    @FaizSultan430 Před 11 měsíci

    hy sir hope u doing well
    why this happens ?
    const obj1 = {a:1}
    const obj2 = {a:2}
    const spread = {...obj1, ...obj2}
    console.log(spread, "from spread");
    and the answer is____ { a: 2 } from spread
    why { a: 2 } not {a : 1 }

    • @VikashSingh-hc6zo
      @VikashSingh-hc6zo Před 9 měsíci +1

      because both object has same property name so spread will overide the value of last object..

  • @HemantKumar-zi4xr
    @HemantKumar-zi4xr Před 7 měsíci

    Hello Bhai, agr hm array ke inside multiple object create krte with key 0,1,2 etc. to ese hm kese access krnege esme

  • @DilipKumar-zp7jg
    @DilipKumar-zp7jg Před rokem

    I think you missed constructor
    And how singleton is object is created can you explain in detail

  • @hamvlogwale
    @hamvlogwale Před 6 měsíci

    77k view but 3.3k hi like ... friends like bhi kr diya kro sir bhi to apne liye kitni mehnat krte he

  • @kripashanker7201
    @kripashanker7201 Před 12 dny

    thank you sirr🙏🙏🙏🙏🙏🙏🙏🙏🙏

  • @smrutirekhapanda760
    @smrutirekhapanda760 Před 9 měsíci

    Thank you so much this series but my personal favorite is how you explained Spread. Each bit you covered so well.

  • @Subha_life
    @Subha_life Před 11 měsíci

    just beautiful series

  • @techkul861
    @techkul861 Před rokem

    Thank you sir for this amazing Tutorial

  • @yashvijaybombale6896
    @yashvijaybombale6896 Před 8 měsíci

    obj.hasOwnProperty("propertyName") return an boolean

  • @_Blackwolf_01
    @_Blackwolf_01 Před rokem +1

    this keyword kise use kare arrow function ke sath ?

  • @harsh-alashi
    @harsh-alashi Před rokem

    Thank You Hitesh Sir!

  • @musaafirhoonyaaron2379
    @musaafirhoonyaaron2379 Před 6 měsíci

    Bhaiya in video 8:30 You're explaining how to merging two objects but the same thing I am doing in my Laptop I am getting different output
    const obj1 = {number: '1', isThere: true, name: 'sphix'};
    const obj2 = {number: '2', isThere: false, name: 'canopus'};
    const obj3 = Object.assign({}, obj1, obj2);
    console.log(obj3);
    Output { number: '2', isThere: false, name: 'canopus' }
    While I search the issue on CHATGPT, It's telling that It's Overwriting the values
    **********************CHAT GPT Response********************************************
    The `Object.assign()` method in JavaScript is used to copy the values of all enumerable properties from one or more source objects to a target object. In your case, you are creating a new object (`obj3`) by merging the properties of `obj1` and `obj2` into an empty object `{}`.
    The reason you are not seeing the properties of `obj1` in the result is because the properties of `obj2` are overwriting the properties of `obj1` during the assignment. The `Object.assign()` method assigns values from right to left, so the properties of `obj2` overwrite the corresponding properties of `obj1` in the new object.
    If you want to include the properties of both `obj1` and `obj2` in the resulting object, you can swap the order of the objects in the `Object.assign()` method:
    ```javascript
    let obj3 = Object.assign({}, obj2, obj1);
    console.log(obj3);
    ```
    Now, the properties of `obj1` will overwrite the properties of `obj2` in the resulting object. Keep in mind that if there are overlapping properties with different values, the values from the object on the right will take precedence.

  • @Instrumentation010
    @Instrumentation010 Před 9 měsíci

    Just awesome, maja aa gaya

  • @user-pg2ff6tg2w
    @user-pg2ff6tg2w Před 8 měsíci

    const obj1={
    name:"ravi",
    age:1,
    }
    const obj2={
    name:"don",
    age:2,
    }
    console.log("1",obj1)
    console.log("2",obj2)
    // Object.assign(obj1,obj2);
    // console.log("1",obj1)
    const obj3=Object.assign({},obj1,obj2);
    console.log("3",obj3) obj3 is not getting updated with both obj1 and obj2 its only updating obj2 why is this?

  • @MuhammadAli-hh9td
    @MuhammadAli-hh9td Před 4 měsíci

    One of the best

  • @sandeepdev0
    @sandeepdev0 Před 11 měsíci

    Absultely khatrnaak Javascript series, Sir I have completed Javascript, Basically full MERN stack paid course and there we have spent three weeks on javascript and dig deep into javascript, but after watching this series, every video, am getting know something new, in every single video, Its just amazing, I think best of the best series ever on Javascript.
    Thanks a lot man, You are really great, Keep going, I am your genuine subscriber from now😊

  • @sakirhusain7276
    @sakirhusain7276 Před 7 měsíci

    Console.log(user.greeting())
    Isliye unfined araha hai
    User.greeting() ye sahi hai nahi ayega

  • @rinkuvis8193
    @rinkuvis8193 Před 11 měsíci

    best video

  • @ja3r
    @ja3r Před 7 měsíci

    Sir what is a single ton object please please please give the ans of this question please 🙏

  • @developermohsin6594
    @developermohsin6594 Před rokem

    Teaching style man 🔥❤

  • @TasnimulFahim
    @TasnimulFahim Před 8 měsíci

    Thanks vai ctrl + l ke liey

  • @akshaybadwaik-nl5ng
    @akshaybadwaik-nl5ng Před 5 měsíci

    thank you