Filter
Exclude
Time range
-
Near
Replying to @maybeshalinii
Great post here Shalini👍💯 On a related note, just wanna mention, that we should be careful about TDZ. 🚫 **Temporal Dead Zone (TDZ) and Error Behaviors**:🚫 So TDZ is about the basic differences among `var`, `let`, and `const` when it comes to hoisting. 👉 **Hoisting** is a JavaScript mechanism where variable and function declarations are moved to the top of their containing scope during the compilation phase. However, only the declarations are hoisted, not the initializations. When we say "`var` variables are hoisted", it means: If you declare a variable with `var` anywhere in a function or globally, its declaration is "lifted" to the top of the function or global scope. However, the actual value assignment remains in place. If you access the variable before its value assignment, it will return `undefined`. -------- NOT `var` variables are hoisted and initialized with `undefined`, while `let` and `const` are hoisted but not initialized. This uninitialized state is what's often referred to as the Temporal Dead Zone (TDZ). However, a lesser-known detail is how they each behave in terms of errors when accessed during their respective TDZs: 1. For `var`: - Since it's initialized with `undefined`, accessing a `var` variable before its declaration will not throw an error; instead, it will return `undefined`. 2. For `let`: - If you try to access a `let` variable before its declaration, JavaScript will throw a `ReferenceError` because it's in the TDZ and not yet initialized. 3. For `const`: - It behaves similarly to `let` in terms of the TDZ. Accessing a `const` before its declaration will throw a `ReferenceError`. However, there's another edge case to consider: If you declare a `const` variable but do not immediately initialize it, you'll receive a `SyntaxError`. This enforces the idea that constants must be initialized at the time of their declaration. Now, while many seasoned developers might be aware of the TDZ for `let` and `const`, the nuance of the different error types – `ReferenceError` vs. `SyntaxError` – for uninitiated `const` variables might catch some off guard. --------------------------- 🚀If you are preparing for JavaScript / React Interview - Check out my Github Repo (⭐It's got 2.7K Stars⭐🌠) - Will give you enough win🚀🔥 👉👉 github.com/rohan-paul/Awesom… #javascript #javascriptdeveloper #javascripts #javascript30 #learnjavascript #javascriptdevelopers #javascriptengineer #javascriptlover #javascripttutorial #javascripting #javascriptdev #javascriptlearning #javascriptframework #learningjavascript #javascript_love #vanillajavascript #javascriptislife #javascriptbasics #javascriptiskillingmysoul #javascriptbook #eloquentjavascript #javascriptlibraries #fullstackjavascript #javascriptcode #javascriptprogrammer #javascriptlovers #javascriptbootcamp #javascripters #javascriptcafe #javascriptforbabies #javascripttips #instajavascript #javascriptla #ilovejavascript #javascriptprogramming #javascript3 #javascriptjustice #javascriptninja #javascriptcoder #html #css
3
541
Trending: 8 JavaScript Set Methods You Should Master Today 😎 ➤ javascriptla.net - subscribe for more news! 📧 #programming #learntocode #softwareengineer #hackbuddy #javascript #javascriptla #100DaysOfCode #coding #nextjs makeuseof.com/javascript-set…
5
2
Do you know how to Test an API Using Python and JavaScript? 🧐 ➤ javascriptla.net - subscribe for more news! 📧 #python #programming #learntocode #softwareengineer #hackbuddy #javascript #javascriptla #100DaysOfCode #coding #nextjs makeuseof.com/what-is-api-te…
3
2
Use the Notion API to create a Quiz with JavaScript🤓 📙 ➤ javascriptla.net - subscribe for more news! 📧 #react #programming #learntocode #softwareengineer #hackbuddy #javascript #javascriptla #100DaysOfCode #coding #nextjs sitepoint.com/notion-api-jav…
4
2
How I Became a Software Engineer (From Designer to Developer) 👨‍💻 ➤ javascriptla.net - subscribe for more news! 📧 #react #programming #learntocode #softwareengineer #hackbuddy #javascript #javascriptla #100DaysOfCode #coding #nextjs leerob.io/blog/career
4
3
6 Tools for Documenting Your React Components Like a Pro 📄 🤠 ➤ javascriptla.net - subscribe for more news! 📧 #react #programming #learntocode #softwareengineer #hackbuddy #javascript #javascriptla #100DaysOfCode #coding blog.bitsrc.io/6-tools-for-d…
3
2
Check this out ➤ Gang of Four Design Patterns 📚 ➤ javascriptla.net - subscribe for more news! 📰 #book #programming #learntocode #softwareengineer #hackbuddy #javascript #javascriptla #100DaysOfCode #coding springframework.guru/gang-of…

1
9
3
5 Practical ways to earn dollars just by using GitHub 💰 ➤ javascriptla.net - subscribe for more news! 📰 #git #github #learntocode #softwareengineer #hackbuddy #javascript #javascriptla #100DaysOfCode #coding content.techgig.com/5-practi…
4
2
A new way to solve the ‘hardest of the hard’ computer problems 🕵 javascriptla.net - subscribe for more news 📬 #netflix #javascriptla #api #codinglife #learntocode #hackbuddy #softwareengineer sciencedaily.com/releases/20…
1
2
1
Do you know what is the difference between "npm install" and "npm ci"? 💬 below javascriptla.net - subscribe for more news 📬 #portal #react #reacthook #javascript #javascriptla #typescript #codinglife #learntocode #hackbuddy #softwareengineer stackoverflow.com/questions/…
1
1
Do you know what is the difference between "npm install" and "npm ci"? 💬 below javascriptla.net - subscribe for more news 📬 #portal #react #reacthook #javascript #javascriptla #typescript #codinglife #learntocode #hackbuddy #softwareengineer stackoverflow.com/questions/…
1
1
Do you know how to Migrate a React App to TypeScript? 🕵️‍♀️ More news here: javascriptla.net - subscribe❗❗❗ #react #reactjs #typescript #codinglife #learntocode #softwareengineer #hackbuddy #javascript #javascriptla #code #framework sitepoint.com/how-to-migrate…

2
1
Upcoming Meetup - Oct 13 at 5pm - Let’s hook up! (with React) w/Nir Kaufman RSVP>>>> bit.ly/39HU6xC Worst case scenario: we might learn something new 🙂 #react #javascript #javascriptla #hackbuddy #learntocode
2
4