JavaScript: the tricky parts | scope, hoisting, arrow functions, promises, fetch...

preview_player
Показать описание

In this stream, Senior Developer Michael is back to help you understand the difficult parts of JavaScript, which often trip people up.

We'll look at:

💜 Block scope
💜 Global scope
💜 Hoisting
➡️ Arrow functions
💜 Function declarations
💜 Function expressions
💜 IIFEs
💜 Promises
💜 Fetch
💜 Async/await
🙋 Your questions


🐦 Say hi on Twitter:
Рекомендации по теме
Комментарии
Автор

17:00 lol at ignoring the question that way ahahah

Just to let you know var is function scoped and let is block scoped.

P.S. - one more dangerous thing about var is that you can write
var a = 5;
var a = 6;
console.log(a)
// Output: 6

let a = "g";
let a = "k";
console.log(a)
// Uncaught SyntaxError: Identifier 'a' has already been declared

So, basically var can be redeclared and reinitialized 🤯
That's why only use let and const. They are modern, more predictable and strict.

dopetag
Автор

Hello, can't find this course on Scrimba/Courses, could you share a link please?

georgesd