Javascript Interview Questions ( Objects ) - Output Based, Destructuring, Object Referencing, etc

Поделиться
HTML-код
  • Опубликовано: 7 июн 2024
  • #JavascriptInterview #Javascript #FrontendInterview
    Javascript Interview Questions on objects will be discussed in this video including topics like Object Destructuring, Object Referencing, Spread and Rest Operators, Shallow vs Deep Copy, Ways to clone an object and much more!
    🟦 Follow me on Twitter and u will clear your interview 🤓 -
    / piyush_eon
    ⭐ Support the channel and learn from me One on One -
    / @roadsidecoder
    🔗 Blog for the video -
    roadsidecoder.hashnode.dev/ja...
    🔗 Functions Interview Video -
    • Javascript Interview Q...
    🔗 Map, Filter and Reduce Interview Video -
    • Javascript Interview Q...
    🔗 Javascript Interview Series -
    • Javascript Interview Q...
    🔗 Cars24 Interview Experience -
    • Frontend Interview Exp...
    🔗 Unacademy Interview Experience -
    • Frontend Interview Exp...
    🔗 MERN Stack Tutorial with Redux -
    • MERN Stack Project Tut...
    🔗 React Beginner's Project Tutorials -
    • React JS Project Tutor...
    -------------------------------------------------------------------------
    00:00 Intro
    00:29 What are Objects?
    01:04 Working with Objects
    02:19 Interview Question on delete keyword
    04:15 Computed Properties
    05:36 Looping through Objects
    06:38 Ques 1 - Output Based
    07:14 Ques 2 - Implement this function ?
    08:53 Ques 3 ( Important ) - Output Based
    10:25 Ques 4 - Stringify vs Parse
    13:39 Ques 5 - Spread Operator
    14:17 Ques 6 - Spread Operator
    14:55 Ques 7 - Output Based
    15:35 Ques 8 - 'this' keyword
    16:54 Ques 9 - Destructuring
    19:04 Ques 10 - Output Based
    20:06 Ques 11 - Object Referencing
    21:11 Ques 12 - Object Referencing
    21:50 Ques 13 - Object Referencing
    22:56 Ques 14 - Output Based
    24:35 Ques 15 - Output Based
    26:08 Ques 15 - Shallow vs Deep Copy
    26:47 Ques 16 - 3 Ways to clone an Object
    28:26 Written Blog link in description
    -------------------------------------------------------------------------
    Special Thanks to our members -

Комментарии • 175

  • @RoadsideCoder
    @RoadsideCoder  2 года назад +1

    🔴 Get my Complete Frontend Interview Prep course - roadsidecoder.com/course-details

  • @chinmoyborah376
    @chinmoyborah376 Год назад +23

    For me , a great video for revision. Thanks.
    Just a minor thing I would like to add for deep and shallow copy. While we use Object.assign({}, obj) or use spread operator {...obj} , only the primitive objects inside the main object gets deep cloned into new object. For the nested objects, only the reference is stored, which is basically shallow copy.

  • @prangshugogoi5624
    @prangshugogoi5624 2 года назад +42

    Kindly make a video on interview questions on cookies , local storage & session storage … also to mention nice explanation on the topics , Thank you 🙏

  • @ashishmadan5700
    @ashishmadan5700 Год назад +2

    I didn't find such a great video on Internet !! Thanks, man for such amazing content❤️Keep posting such content !!

  • @girishanavani8620
    @girishanavani8620 2 года назад +9

    Great video! Also, a video on local storage, session storage, and Indexed DB with the use case would be a great one.

  • @abdelrahmanelsaadany892
    @abdelrahmanelsaadany892 Год назад

    I didn't know this video existed! Thanks bro! Really grateful.

  • @makingeliteinfotech5305
    @makingeliteinfotech5305 11 месяцев назад

    Thank piyush , I recommend your videos to everyone

  • @juniorWeb247
    @juniorWeb247 Год назад

    Really really help to me, thank you much brother. You are really doing a good job. God bless you, man.

  • @prabhneetsingh13
    @prabhneetsingh13 Год назад

    This was such a great video, it cleared so many small small concepts of mine

  • @avinashverma5538
    @avinashverma5538 Год назад

    awesome video, helps a lot to clear concepts about objects. Thanks

  • @Haffiz.siddique
    @Haffiz.siddique Год назад

    This video was so life changing, keep up the good work

  • @DeepakSingh-eq8jl
    @DeepakSingh-eq8jl 2 года назад +2

    Yes, please make some more lectures on interview questions including session and local storage

  • @trendingindia972
    @trendingindia972 2 года назад

    Excellent video as always brother thank you

  • @karthikkonathala3002
    @karthikkonathala3002 2 года назад +1

    Yes, please make a video on differences between session storage, local storage and cookies when and how to use them

  • @srinivasak4087
    @srinivasak4087 7 месяцев назад

    nice clear explanation , Thanks Sir!

  • @deepakkolare
    @deepakkolare 2 года назад +5

    Great explanation! Object.freeze and Object.seal could have been added to the video.

  • @nishachapte7
    @nishachapte7 2 года назад

    Thanks..Amazing and very useful video.

  • @ambesapaulos4323
    @ambesapaulos4323 Год назад

    the way you teach is wonderful keep it up

  • @abhishekkerketta9722
    @abhishekkerketta9722 2 года назад +2

    Please make a series of output based....It would really be very helpful.....

  • @smordefx7688
    @smordefx7688 Год назад

    works great and without any problems

  • @k.ksharma4457
    @k.ksharma4457 2 года назад +2

    great explanation as always u do 👍 and yes ye dil mange more 😀 so plz post a video based on local storage cookies and sessions deeply

  • @sunilr.v.6345
    @sunilr.v.6345 2 года назад +1

    how well you have explained such complex topics ... great work ....keep it up ..!!!!

  • @ansarisuhail5127
    @ansarisuhail5127 2 месяца назад

    Such a great video🎉

  • @hamid.mahmood96
    @hamid.mahmood96 2 года назад +2

    Yes please make a video on local storage and session storage

  • @shash0_0
    @shash0_0 Месяц назад

    Your content is highly underappreciated. Thanks for your work!

  • @ashuprakash6697
    @ashuprakash6697 2 года назад +6

    Can you provide a link or something related to property you discussed at timestamp 22:32, where you set person to null? It would be really helpful.

  • @abhishekvishwakarma9045
    @abhishekvishwakarma9045 2 года назад

    Nice Explanation 🔥

  • @ajithk.s7848
    @ajithk.s7848 Год назад

    Good and specific content.. 👌

  • @kumar_awadhesh
    @kumar_awadhesh 2 года назад

    Good job 👍👍 Thank you

  • @user121304
    @user121304 Год назад

    Hi Piyush, Thank you for this wonderful series. Please make a tutorial on LocalStorage, Session storage and cookies. Will appreciate it. Thanks!!!

  • @BrijeshSingh-dp1ku
    @BrijeshSingh-dp1ku 2 года назад +2

    Please make video on local storage, session storage and cookies ... It will be great help 🙏

  • @tpadma7419
    @tpadma7419 Месяц назад

    100% interview preparation..........very very thankfull...waiting for more such videos.....

    • @RoadsideCoder
      @RoadsideCoder  Месяц назад

      Checkout the full course here - roadsidecoder.com/course-details

  • @shubhambhardwaj1019
    @shubhambhardwaj1019 2 года назад

    Explanation 👌

  • @himanshupandey3451
    @himanshupandey3451 Год назад

    great big fan now

  • @100bi8
    @100bi8 10 месяцев назад

    ThankYou Prabhu ❤❤

  • @RahulKumar-ew1qw
    @RahulKumar-ew1qw 2 года назад +2

    Please make vdo on local storages, session, cookies And cache too.. Thanks you bro in advance.

  • @lucaliebenberg7565
    @lucaliebenberg7565 Год назад +1

    Great video Piyush 💯 would you be able to please do a video on interview questions related to local storage, sessions and cookies?

  • @princeverma6533
    @princeverma6533 Год назад

    Great Video, Please make video on cookie, session and local storage with examples

  • @osamajune9
    @osamajune9 Год назад

    You are great ❤

  • @santhoshburgula6952
    @santhoshburgula6952 Год назад +1

    Bro, I have gone through some videos, you are simply rocking and just you inspired me a lot.
    what should I do to pro in javascript like you ? is there any best book for javascript and as well as practice problems?
    please refer to any suggestions and root map.
    by the by, im from Non-IT background.

  • @kitchen-e-kausar9105
    @kitchen-e-kausar9105 Год назад

    Great video, thank you.
    For the last question I'm confused, Object.assign and spread operator, do they really create a deep copy? Would have been great if the video ended with the sone nested object examples.

  • @SalmanKhan-lx9kp
    @SalmanKhan-lx9kp 2 года назад +1

    waiting 🔥

  • @amanmalhotra8730
    @amanmalhotra8730 4 месяца назад

    awesome ❤❤

  • @subhramukherjee6990
    @subhramukherjee6990 Год назад

    Good questions with great explanation.

  • @kanchanmatai4170
    @kanchanmatai4170 Месяц назад

    Very nicely explained about json.parse and json.stringify with their use case. Please make more such videos on intserview questions based on output and coding.

  • @sanamukhtar4008
    @sanamukhtar4008 10 дней назад +1

    thank you

  • @instinct_gallant8694
    @instinct_gallant8694 Год назад

    TNice tutorials tutorial was worth it, I understood everytNice tutorialng now

  • @VishalSharma-rn7mt
    @VishalSharma-rn7mt 6 месяцев назад

    Awesome

  • @pratikwadekar4981
    @pratikwadekar4981 2 года назад +1

    JSON.stringify and JSON.parse will only work on JSON safe objects. If the objects contain functions, symbols or dates that won’t create a deep clone

  • @DevangPatil
    @DevangPatil Год назад

    Amazing..

  • @hareshdhanani2073
    @hareshdhanani2073 Год назад

    Thanks.

  • @tamilselvans147
    @tamilselvans147 Год назад +1

    Hi bro, nice session. Pls do a video for How to make api's very secure?.. what are the possibilities? Jwt, Refresh token, etc

  • @SamruddhaShah
    @SamruddhaShah 2 года назад

    Learn alot

  • @salonipande6190
    @salonipande6190 2 года назад

    Yes please make video on localstorage n session n cookies

  • @cloud9656
    @cloud9656 Год назад

    Please create more videos for this playlist.
    Thanks

  • @kartik7775
    @kartik7775 Год назад

    awesome videos, thank you!!!!!

  • @pavithrasai1392
    @pavithrasai1392 Год назад

    can you explain about cyclic structures and why we cannot apply json.stringify on them?

  • @ajmalansari3165
    @ajmalansari3165 27 дней назад

    Yes make a video on local storage, session storage and cookies etc.

  • @vipin3982
    @vipin3982 2 года назад

    Bro!!!!!!!!!!!!!!!Awesome Video

  • @rakaa31
    @rakaa31 Год назад

    please make a video on How much javascript is enough for interviews and what are the important topics to focus on for interviews

  • @MrK-nb7xr
    @MrK-nb7xr 2 года назад

    Please make on cookies , local storage, session related stuff every things
    ..
    Thanks

  • @xync1252
    @xync1252 2 года назад +1

    Portfolio making please

  • @abcxyz5385
    @abcxyz5385 Год назад +1

    Sir, please make video on session storage and local storage

  • @SachinKumar-bb2yn
    @SachinKumar-bb2yn Год назад

    Please make video on local storage

  • @andrei-gabrieldragomir
    @andrei-gabrieldragomir 11 месяцев назад

    good

  • @Krishnasaini
    @Krishnasaini Год назад

    Where to practice more about these topics?

  • @V_Prahlad
    @V_Prahlad Год назад

    You are gor for me.

  • @prabhneetsingh13
    @prabhneetsingh13 Год назад

    Kindly make a video on local storage, session storage and cookies

  • @ninjatechstudio
    @ninjatechstudio 2 года назад

    excellent

  • @ojaspalorkar7434
    @ojaspalorkar7434 9 месяцев назад

    Please make video on local storage session storage !!

  • @saikatbose2410
    @saikatbose2410 Год назад

    Please make the video on local storage, session storage, cache and cookies etc

  • @rahulrathod8959
    @rahulrathod8959 2 года назад

    Hi.
    But we can't reassign to a constant variable.
    As personObj1 is constant variable then why it is able to reassign in the function changeAgeandName?

  • @codictive
    @codictive Год назад

    pls make video on storage

  • @vijenderkumar3034
    @vijenderkumar3034 5 месяцев назад

    Please make video on local and session storage and cookie

  • @chirag8250
    @chirag8250 2 года назад

    13:35 yes please!

  • @kmsnymisha4607
    @kmsnymisha4607 2 года назад +5

    Can you please explain why the members array remained same when person is set to null and why it changed to null only on changing the name property in the person object at 21:50

    • @RoadsideCoder
      @RoadsideCoder  2 года назад +1

      Because we are reassigning the value which replaces the previous object, but in case of name properly, we are changing the value of that key which has the reference to the original object.

  • @HimanshuSharma-mx7yx
    @HimanshuSharma-mx7yx 11 месяцев назад

    Make a video on the loacal Storage, cookies and session storage

  • @ayushrastogi_
    @ayushrastogi_ 7 месяцев назад

    Please create a video on interview questions asked about Local Storage and Sessions Storage.

  • @cb559
    @cb559 Год назад

    on timestamp 18.10 we are not renaming the value of name , we are assigning the value of name to myName .As renaming means changing the value of name to other string Please correct me if i am wrong

  • @xync1252
    @xync1252 2 года назад

    Please make portfolio video egarlu waiting...

  • @user-wq4hm4wr4r
    @user-wq4hm4wr4r 7 месяцев назад

    make video on local storage and session storage

  • @jhaganb9215
    @jhaganb9215 Год назад

    Can you make videos related to dsa using JavaScript for the dsa round in frontend interviews - also give some idea about how to get frontend internship opportunity while in college. hoping for your reply :)

  • @ShubhamPatil-rr4on
    @ShubhamPatil-rr4on 2 года назад +1

    Read it.....👉
    Most welcome brother,lot of people watching you , yesterday I watched technical suneja live and thaire one of the people tell to Ajay sir that's I'm watching roadside coder js videos.and Ajay sir also appreciate it.💯♥️👍
    Keep it up

    • @RoadsideCoder
      @RoadsideCoder  2 года назад +2

      Oh wow bro, can u provide me the timestamp of that video where he said that?

    • @BrijeshSingh-dp1ku
      @BrijeshSingh-dp1ku 2 года назад

      @@RoadsideCoder 32.25

    • @ShubhamPatil-rr4on
      @ShubhamPatil-rr4on 2 года назад

      32:25
      Yesterday I shared you timestamp but I don't know how it will didn't upload.
      Can we connect on LinkedIn I have some few queries if you help me out it will lot toe.

    • @RoadsideCoder
      @RoadsideCoder  2 года назад

      @@ShubhamPatil-rr4on Sure

  • @20TUEC012ATHILAKSHMI.M
    @20TUEC012ATHILAKSHMI.M Месяц назад

    kindly make video on localStorage session

  • @sidd_shaikh
    @sidd_shaikh 9 месяцев назад

    Hello sir if the object is deeply nested then how can we make deep copy

  • @floatingcloud5955
    @floatingcloud5955 Год назад

    2:27 fe = function expression
    You can assign a function() without 'function name' to a variable as value is called
    Function expression
    var a= function (){
    }

    • @yaduvanshiNK
      @yaduvanshiNK Год назад

      An IIFE (Immediately Invoked Function Expression) is a JavaScript function that runs as soon as it is defined.

  • @divyasampath2843
    @divyasampath2843 Год назад

    I did not get this part, if someone can help: Since we are assigning obj1 to obj2, ideally whatever is the value is set to obj1 should be the same for obj2, right? as in, for both, the name should by 'pi', and age 7, isnt it?
    function change(obj) {
    obj.name = 'pi',
    obj = {
    name: 'hena',
    age:9,
    }

    return obj;
    }
    var obj1 = {
    name: 'div',
    age: 7,
    }
    const obj2 = change(obj1);
    console.log(obj1);
    console.log(obj2);

  • @bandaumamahesh9346
    @bandaumamahesh9346 3 месяца назад

    Bro can you please tell me some good books for javascript and react.

  • @emilyaung2963
    @emilyaung2963 2 года назад +1

    Hey wouldn't Object.assign({} , user) and the spread operator do shallow copy? vs the JSON.stringify and parse will do deep copy?

    • @deepakkolare
      @deepakkolare 2 года назад +1

      Object.assign and spread are shallow copy for nested object for direct properties it’s a deep copy.

    • @RoadsideCoder
      @RoadsideCoder  2 года назад

      Yes I've mentioned that this doesn't work for nested properties.

  • @rams9169
    @rams9169 Год назад

    Hi all... i have small doubt for the below object...how to find key and value both ("second " : 2) in the below object..please i need your solutions
    const iem = {
    "first" : new Date(),
    "second" : 2,
    "third" : "test"
    }

  • @rohitahuja999
    @rohitahuja999 Год назад

    why don't you use node js and run js code in terminal

  • @karthikeyasoft
    @karthikeyasoft Год назад

    I have little bit confusion over changeAgeAndReference topic time 25:50 personObj1 how come age : 25

  • @avinash15sharma
    @avinash15sharma Год назад

    How we can compare two objects with same key-value pair but in different order? Also we are not allowed to use Lodash. Only Javascript solution.

  • @keshavgaur1886
    @keshavgaur1886 2 года назад

    I have been asked about how to print keys i was knowing the concept of foreign loop but don't know what happened during the interview was not able to tell that

  • @mrrishiraj88
    @mrrishiraj88 2 года назад

    👍

  • @nishantshah_
    @nishantshah_ 2 года назад

    Object.assign and destructuring creates shallow copy only.

  • @adnantariq3346
    @adnantariq3346 Год назад

    5:38 Trying to loop through an object will NOT work in react. it will give "'key' is not defined"

  • @JohnSnow-gi7iv
    @JohnSnow-gi7iv 2 года назад

    Is a career in frontend a good long term option? I feel a career in full stack or backend is better in long term? Your opinion will be helpful on this.

    • @RoadsideCoder
      @RoadsideCoder  2 года назад

      Yes ofcourse it is! Why would you think that?

  • @prasoonmishra6288
    @prasoonmishra6288 2 года назад

    🤩🤩🤩🤩

  • @ayushtiwari-zm1co
    @ayushtiwari-zm1co 2 года назад

    Bhai big fan please reply 🙏🙏🙏