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 -
🔴 Get my Complete Frontend Interview Prep course - roadsidecoder.com/course-details
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.
Kindly make a video on interview questions on cookies , local storage & session storage … also to mention nice explanation on the topics , Thank you 🙏
I didn't find such a great video on Internet !! Thanks, man for such amazing content❤️Keep posting such content !!
Great video! Also, a video on local storage, session storage, and Indexed DB with the use case would be a great one.
I didn't know this video existed! Thanks bro! Really grateful.
Thank piyush , I recommend your videos to everyone
Really really help to me, thank you much brother. You are really doing a good job. God bless you, man.
This was such a great video, it cleared so many small small concepts of mine
awesome video, helps a lot to clear concepts about objects. Thanks
This video was so life changing, keep up the good work
Yes, please make some more lectures on interview questions including session and local storage
Excellent video as always brother thank you
Yes, please make a video on differences between session storage, local storage and cookies when and how to use them
nice clear explanation , Thanks Sir!
Great explanation! Object.freeze and Object.seal could have been added to the video.
Thanks..Amazing and very useful video.
the way you teach is wonderful keep it up
Please make a series of output based....It would really be very helpful.....
works great and without any problems
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
how well you have explained such complex topics ... great work ....keep it up ..!!!!
Thank you, I will
Such a great video🎉
Yes please make a video on local storage and session storage
Your content is highly underappreciated. Thanks for your work!
I appreciate that!
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.
Nice Explanation 🔥
Good and specific content.. 👌
Good job 👍👍 Thank you
Hi Piyush, Thank you for this wonderful series. Please make a tutorial on LocalStorage, Session storage and cookies. Will appreciate it. Thanks!!!
Please make video on local storage, session storage and cookies ... It will be great help 🙏
100% interview preparation..........very very thankfull...waiting for more such videos.....
Checkout the full course here - roadsidecoder.com/course-details
Explanation 👌
great big fan now
ThankYou Prabhu ❤❤
Please make vdo on local storages, session, cookies And cache too.. Thanks you bro in advance.
Great video Piyush 💯 would you be able to please do a video on interview questions related to local storage, sessions and cookies?
Great Video, Please make video on cookie, session and local storage with examples
You are great ❤
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.
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.
waiting 🔥
awesome ❤❤
Good questions with great explanation.
Thanks a lot!
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.
thank you
TNice tutorials tutorial was worth it, I understood everytNice tutorialng now
Awesome
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
Amazing..
Thanks.
Hi bro, nice session. Pls do a video for How to make api's very secure?.. what are the possibilities? Jwt, Refresh token, etc
Learn alot
Yes please make video on localstorage n session n cookies
Please create more videos for this playlist.
Thanks
awesome videos, thank you!!!!!
Welcome!
can you explain about cyclic structures and why we cannot apply json.stringify on them?
Yes make a video on local storage, session storage and cookies etc.
Bro!!!!!!!!!!!!!!!Awesome Video
Thanks!!
please make a video on How much javascript is enough for interviews and what are the important topics to focus on for interviews
Please make on cookies , local storage, session related stuff every things
..
Thanks
Portfolio making please
Sir, please make video on session storage and local storage
Please make video on local storage
good
Where to practice more about these topics?
You are gor for me.
Gor?
Kindly make a video on local storage, session storage and cookies
excellent
Thank you! Cheers!
Please make video on local storage session storage !!
Please make the video on local storage, session storage, cache and cookies etc
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?
pls make video on storage
Please make video on local and session storage and cookie
13:35 yes please!
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
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.
Make a video on the loacal Storage, cookies and session storage
Please create a video on interview questions asked about Local Storage and Sessions Storage.
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
Please make portfolio video egarlu waiting...
make video on local storage and session storage
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 :)
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
Oh wow bro, can u provide me the timestamp of that video where he said that?
@@RoadsideCoder 32.25
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.
@@ShubhamPatil-rr4on Sure
kindly make video on localStorage session
Hello sir if the object is deeply nested then how can we make deep copy
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 (){
}
An IIFE (Immediately Invoked Function Expression) is a JavaScript function that runs as soon as it is defined.
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);
Bro can you please tell me some good books for javascript and react.
Hey wouldn't Object.assign({} , user) and the spread operator do shallow copy? vs the JSON.stringify and parse will do deep copy?
Object.assign and spread are shallow copy for nested object for direct properties it’s a deep copy.
Yes I've mentioned that this doesn't work for nested properties.
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"
}
why don't you use node js and run js code in terminal
I have little bit confusion over changeAgeAndReference topic time 25:50 personObj1 how come age : 25
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.
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
👍
Object.assign and destructuring creates shallow copy only.
5:38 Trying to loop through an object will NOT work in react. it will give "'key' is not defined"
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.
Yes ofcourse it is! Why would you think that?
🤩🤩🤩🤩
Bhai big fan please reply 🙏🙏🙏
😂