Javascript Coding Interview Questions | Advanced Javascript Interview Questions

Javascript Coding Interview Questions | Advanced Javascript Interview Questions

Monsterlessons Academy

3 года назад

13,784 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@CANIHAZURDREAMSPLS
@CANIHAZURDREAMSPLS - 27.09.2023 12:49

I finally know why we need to bind(this) for class components... because otherwise "this" is global context rather than parent context - thank you sir!

Ответить
@miggu
@miggu - 22.09.2023 19:12

it's very hard to do a video like this, thank you. I think functions should be explained in hoisting as they can be invoked before declaring, I know it's one of those js quirks

Ответить
@doniaelfouly4142
@doniaelfouly4142 - 05.03.2023 15:29

thanks

Ответить
@TechVarLAB
@TechVarLAB - 26.01.2023 13:15

thanks!

Ответить
@kumailn7662
@kumailn7662 - 29.07.2022 22:56

you missed the return keyword in function

Ответить
@victortochila9642
@victortochila9642 - 05.05.2022 16:46

You have an error explaining the difference between arrow and plain function:
First of all, you used classes, which is really bad for explaining diff between arrow vs regular functions.
If I add following code to jsfiddle/codesandbox I am getting compiler errors => we should use only methods inside classes.
But anyway your getSurname method returns nothing, so undefined is the only value you could get.
If you return this you would get object here, this is some weird behavior of classes which is not obvious again.

And generally, after your example, it seems like we need to use arrowFunctions for object methods, when the reality is opposite:
We need to use arrow functions almost everywhere where we want to save current context e.g. callbacks, but for object methods, where we need to use regular functions.

Ответить
@antoniozach91
@antoniozach91 - 24.11.2021 17:29

Excellent video! That channel worth more boost! Keep going well man!

Ответить
@tianadede349
@tianadede349 - 08.11.2021 13:45

thanks

Ответить
@sandtree
@sandtree - 10.08.2021 02:08

Thanks.

Ответить
@devilslide8463
@devilslide8463 - 18.06.2021 09:52

Regarding class example and „this” binding. You are not returning anything from getSurname function. That is why I think you are getting undefined. If you console log “this” for both functions you should get class context.

Ответить
@cjmaaz
@cjmaaz - 15.06.2021 17:51

You explained Closures with one more js topic I was asked in an interview "Currying". I guess this is a bonus hidden tip for this video. 😛

Ответить
@sssrikanthhh
@sssrikanthhh - 15.06.2021 17:02

Excellent content as always🔥🔥🔥

Ответить