JS Interview - ASI - Question 5

preview_player
Показать описание
This is the fifth episode of the JavaScript Interview Question Series.

Рекомендации по теме
Комментарии
Автор

Thank you for this series, amazing work.

Rangerali
Автор

At Time(3:50)

'let' is not hoisted. 'a' would have been undefined if you have used 'var'. In the current case, output will be that 'a is not defined'.

njamdagani
Автор

Hello Steve, thanks again for the best educational videos.
Question, I'm using Quokka and when I try to follow along and type

let obj = {a:123}
[obj].forEach()

I get Cannot access 'obj' before initialization error. is this supposed to be like that? Thanks

DmitriyMalayevProfile
Автор

Hi @Steve Griffith.
At 5:08, if its' trying to find the object's key of undefined, should the word undefined be in quotes, since undefined is not a variable. Kind of the way you did at 2:50?

andrescastillo
Автор

Please explain

console
.log("First line")
[("a", "b", "c")].forEach((element) => console.log(element));
console.log("Third line");

DmitriyMalayevProfile
Автор

Don't the compiler understand the new line to be end of statement without semicolon.

shujaatali
Автор

I don´t get at all what is [a]. Never heard of calling an object like that. Could you explain this man?

weaknessToGreatness
Автор

Does variable declared with 'let' keyword are hoisted? I guess only variables with 'var' are hoisted.

rishabarya