recently i was giving an interview where i was asked about wether let is hoisted or not, I told that let is hoisted but in different manner (since it knows about the existence of the variable ) but he told me that let is not hoisted. What to do in such situations ?
You could have done the following: 1. Show in the browser. You can just run a small program where in the js file you can just write : console.log(a); let a = 10; and then when you run it in debug mode you can show the js scope and script in browser where we can see that a is set to undefined. 2. If not this then even you can show the error in console which is - *Uncaught ReferenceError: Cannot access 'a' before initialization* Obviously the error is not that 'a is not defined' , so if it is not hoisted then it would have thrown not defined. 3. You could have explained about the temporal dead zone. Last but not the least, don't be demotivated with this. Even if you would have done all of this and proved your point then even the interviewer could have been offended. Also, many people just take interviews on the basis of their experience not on the basis of their knowledge. So, some times it's just hard luck to get such interviewers. You are going in the right direction and I am sure, you will get a good job at a good place. All the best 👍
I will try one of these methods if asked in my next interview. and thanks for the reply and for taking your valuable time to write the detailed explanation. 👍
hello mam 🙏 I have a question please guide me i am a non technical background student i have done my graduation in BA from delhi university and recently i have done my deploma in web designing from an institute my skills are JavaScript,react,redux, html,css, bootstrap can i apply for a front-end developer roll please guide me 🙏
The future videos will be in English... I have just published one you can check that out.. Also for this video please check the points I have written in the word document in this video only.. That will be helpful
recently i was giving an interview where i was asked about wether let is hoisted or not, I told that let is hoisted but in different manner (since it knows about the existence of the variable ) but he told me that let is not hoisted. What to do in such situations ?
You could have done the following:
1. Show in the browser. You can just run a small program where in the js file you can just write :
console.log(a);
let a = 10;
and then when you run it in debug mode you can show the js scope and script in browser where we can see that a is set to undefined.
2. If not this then even you can show the error in console which is -
*Uncaught ReferenceError: Cannot access 'a' before initialization*
Obviously the error is not that 'a is not defined' , so if it is not hoisted then it would have thrown not defined.
3. You could have explained about the temporal dead zone.
Last but not the least, don't be demotivated with this. Even if you would have done all of this and proved your point then even the interviewer could have been offended. Also, many people just take interviews on the basis of their experience not on the basis of their knowledge. So, some times it's just hard luck to get such interviewers.
You are going in the right direction and I am sure, you will get a good job at a good place. All the best 👍
I will try one of these methods if asked in my next interview.
and thanks for the reply and for taking your valuable time to write the detailed explanation. 👍
All is simple way understood....thanks a lot......
Glad you liked it 😊
Thanks for this types of videos maam it helps a lot
really awsome video
Thanks!
Ma'am you should define what is hosting how it can be done then the concept of hosting in var let const
hello mam 🙏
I have a question please guide me
i am a non technical background student i have done my graduation in BA from delhi university
and recently i have done my deploma in web designing from an institute
my skills are JavaScript,react,redux, html,css, bootstrap
can i apply for a front-end developer roll
please guide me 🙏
Next videos please
please upload the next topics
Trying to upload soon... 👍
Hi Madam could you please explain in English it's my request
The future videos will be in English... I have just published one you can check that out..
Also for this video please check the points I have written in the word document in this video only.. That will be helpful