Here are your 37 topics organized by section: Execution, Scope & Memory 1. Execution context & call stack 2. var, let, const (scope + hoisting + TDZ) 3. Lexical scope & scope chain 4. Closures (behavior, not definition) 5. Shadowing & illegal shadowing 6. Garbage collection basics & memory leaks Functions & this 7. Function declarations vs expressions 8. this binding rules (default, implicit, explicit, new) 9. call, apply, bind 10. Arrow functions vs normal functions 11. Currying & partial application 12. Higher-order functions Async JavaScript 13. Event loop (call stack, microtasks, task queue) 14. Promises & chaining 15. async / await (error handling & sequencing) 16. Race conditions & stale closures 17. Timers (setTimeout, setInterval) vs microtasks 18. Promise utilities (all, allSettled, race, any) Data, References & ES6+ 19. == vs ===, truthy / falsy & type coercion deep dive 20. Object & array reference behavior 21. Deep vs shallow copy 22. Destructuring, rest & spread 23. Map, Set, WeakMap, WeakSet Prototypes & OOP 24. Prototype chain & Object.create() 25. class syntax vs prototype under the hood 26. Inheritance patterns Error Handling 27. try/catch with async/await edge cases 28. Custom error types 29. Unhandled promise rejections Modules 30. ES Modules (import/export) vs CommonJS (require) 31. Tree shaking concept 32. Dynamic imports — import() Iterators & Generators 33. Symbol.iterator & iterable protocol 34. Generator functions (function*) 35. Connecting generators to RxJS mental model Browser & Runtime Fundamentals 36. Event bubbling, capturing, delegation, preventDefault vs stopPropagation 37. DOM vs Virtual DOM, Reflow vs repaint, Web storage, Polyfills #angular #javascript #html #css #webdeveloper #angularDeveloper
JavaScript Fundamentals and Advanced Topics for Web Developers
More Relevant Posts
-
Pure functions improve testability and composability. ────────────────────────────── JSON.parse and JSON.stringify Pure functions improve testability and composability. #javascript #json #serialization #data ────────────────────────────── Key Rules • Avoid mutating shared objects inside utility functions. • Write small focused functions with clear input-output behavior. • Use const by default and let when reassignment is needed. 💡 Try This const nums = [1, 2, 3, 4]; const evens = nums.filter((n) => n % 2 === 0); console.log(evens); ❓ Quick Quiz Q: What is the practical difference between let and const? A: Both are block-scoped; const prevents reassignment of the binding. 🔑 Key Takeaway Modern JavaScript is clearer and safer with immutable-first patterns. ────────────────────────────── Small JavaScript bugs keep escaping to production and breaking critical user flows. Debugging inconsistent runtime behavior steals time from feature delivery.
To view or add a comment, sign in
-
Ever changed a variable in JavaScript only to realize you accidentally broke the original data too? 🤦♂️ That’s the classic Shallow vs. Deep Copy trap. Here is the "too long; didn't read" version: 1. Shallow Copy (The Surface Level) When you use the spread operator [...arr] or {...obj}, you’re only copying the top layer. The catch: If there are objects or arrays inside that object, they are still linked to the original. Use it for: Simple, flat data. 2. Deep Copy (The Full Clone) This creates a 100% independent copy of everything, no matter how deep the nesting goes. The easy way: const copy = structuredClone(original); The old way: JSON.parse(JSON.stringify(obj)); (Works, but it’s buggy with dates and functions). The Rule of Thumb: If your object has "layers" (objects inside objects), go with a Deep Copy. If it’s just a basic list or object, a Shallow Copy is faster and cleaner. Keep your data immutable and your hair un-pulled. ✌️ #Javascript #WebDev #Coding #ProgrammingTips
To view or add a comment, sign in
-
-
Tagged Template Literals: More Than Just String Interpolation. (Deep Dive into EDSLs) We often teach JS template literals as a way to avoid string concatenation, focusing on ${value} syntax. But as a Front-End Engineer, your understanding cannot stop at the surface. You must grasp Main Thread availability, call stack mechanics, and the memory lifecycle . A tagged template literal (tag\str``) is fundamentally a function call, where the string literal itself is passed as the first argument, and the interpolated values are passed as subsequent arguments. The Architect's Breakdown: This isn't just about avoiding a TBT (Total Blocking Time) penalty. It’s about building predictable, maintainable, and highly optimized systems. Guaranteed Event Loop Integration: Promises leverage the microtask queue, ensuring they are executed with higher priority than callbacks from setTimeout or browser events. This gives you predictable execution order, essential for managing complex async state in React or Vue. Explicit Memory Lifecycle Management: Unlike simple callback functions, a Promise instance explicitly manages its state (Pending, Fulfilled, Rejected). This allows the JavaScript engine to efficiently clear memory through garbage collection once the promise is resolved, preventing memory leaks in large-scale applications. Predictable Async Architecture: When you move beyond "pattern matching" fetch() calls, you understand why async/await syntax can keep the call stack leaner in specific scenarios, reducing overhead and improving main thread responsiveness. The Styled-Components Case Study : The power of tagged template literals is most apparent in popular libraries. When you use styled.button\css``, you aren't just passing a string. You are invoking the styled.button function, which: Parses your raw CSS string using a custom parser. Transforms interpolated expressions (like props => props.primary ? 'blue' : 'gray') into active logic. Generates unique class names and injects your compiled styles into the DOM. #JavaScript #EDSLs #StyledComponents #FrontendArchitecture #WebPerformance #SoftwareEngineering #CleanCode #JavaScriptPragmatics
To view or add a comment, sign in
-
-
Day 22 #100DaysOfCode 💻 1. Difference between map and filter? — B. map transforms, filter selects 2. What triggers this? (addEventListener) — B. Button click 3. What happens here? (onclick) — B. Runs on click 4. What is the output? (map without return) — B. [undefined, undefined, undefined] 5. Which is correct to get input value? — B. value 6. What is the output? (array.find) — B. 2 7. What does async/await simplify? — B. Callbacks 8. What is the output? (array.filter) — B. [3, 4] 9. Which is best for spacing between flex items? — B. gap 10. What does querySelector do? — B. First match 11. Layout direction (Tailwind flex-col md:flex-row) — B. Column on small, row on medium+ 12. Why does map return undefined? — B. Missing return 13. What does JSON.stringify() do? — A. Converts object to string 14. What does Array.push() do? — A. Adds element to the end 15. What is the use of the spread operator (...) ? — C. Copying or merging arrays/objects 16. How to save data in LocalStorage? — B. setItem('key', 'value') 17. Difference between const and let — A. const cannot be reassigned 18. == vs === — B. === checks both value and type 19. What is the output of typeof null? — C. "object" 20. What is Hoisting? — A. Moving declarations to the top 21. Why is useState used in React? — B. To manage component state 22. What does p-4 mean in Tailwind? — A. Padding on all sides 23. What does Array.reduce() do? — B. Accumulate values to a single result 24. Why use event.preventDefault()? — A. Stops default browser behavior 25. Which method does fetch() use by default? — A. GET 🚀 #javascript #reactjs #webdevelopment #frontenddeveloper #coding #learninginpublic #Akbiplob
To view or add a comment, sign in
-
Built a tool in a single HTML file that knows what you just copied. No backend. No npm. No framework. Just open it. Here's what it does → You paste something into a box. It figures out what it is — instantly. 📞 Phone number? → Call button, SMS button, copy digits 🔗 URL? → Open, VirusTotal scan, Google cache 🎨 Hex color? → Palette explorer, color info, copy 📍 GPS coords? → Google Maps, satellite view, directions 💳 Credit card? → Luhn validation + BIN lookup ✈️ Airport code? → Google Flights, terminal map 💻 Code snippet? → Replit, ChatGPT explain, CodePen 10 content types. Detected in under 1ms. The right action buttons appear before you even think to ask. The design goal was one feeling: "how did it know." What I didn't use: → React → npm → A build step → A server → Any dependency except Google Fonts What I did use: → One paste.html file → Vanilla JS with a 10-step regex detection chain → Luhn algorithm for card validation → 120ms debounce so it never thrashes → Pure CSS keyframe animations The whole thing is under 50KB and works offline after first load. This is what I mean when I say constraints make you better. No framework to hide behind. Every decision is intentional. 🔗 Live demo: https://lnkd.in/gF9h873Q ⭐ GitHub: https://lnkd.in/gwT8pWKR #buildinpublic #javascript #webdev #frontend #vanillajs #opensource #sideproject #coding
To view or add a comment, sign in
-
-
💡Don't Use Array Spread Operator In Every Case💡 Yes, you heard that right. If you have a very large data set, then using array spread operator to create a new array will slow down your application and you might receive, "Maximum call stack size exceeded" error. So instead of using array spread operator, use array concat method. const largeArray = [/* your large array */]; const newArray = [/* additional items */]; // Using spread operator (slow for large arrays) const combinedArray1 = [...largeArray, ...newArray]; // Using concat method (more efficient for large arrays) const combinedArray2 = largeArray.concat(newArray); So If you have a very large array, then avoid using spread operator, instead use array concat method. This is because spread operator creates a new array which means each spread operator like …arr1, …arr2 will create a new array and then iterates and then returns a new array. For example, with const result = […arr1, …arr2], javascript will create three arrays one for the result and one for each spread operator (and then iterates it) If we use the same for concat method then there would be one array creation which is result meaning the concat method directly iterates the array. 𝗙𝗼𝗿 𝗺𝗼𝗿𝗲 𝘀𝘂𝗰𝗵 𝘂𝘀𝗲𝗳𝘂𝗹 𝗰𝗼𝗻𝘁𝗲𝗻𝘁, 𝗱𝗼𝗻'𝘁 𝗳𝗼𝗿𝗴𝗲𝘁 𝘁𝗼 𝗳𝗼𝗹𝗹𝗼𝘄 𝗺𝗲. #javascript #reactjs #typescript #webdevelopment
To view or add a comment, sign in
-
𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 𝗦𝘁𝗿𝗶𝗻𝗴𝘀 𝗹𝗼𝗼𝗸 𝘀𝗶𝗺𝗽𝗹𝗲. 𝗧𝗵𝗲𝘆'𝗿𝗲 𝗻𝗼𝘁 Here's the short version: Strings power almost every real-world app: form validation, APIs, text processing, i18n, frontend rendering. Yet most developers never look under the hood. Here's what changes when you do • Strings are immutable Every "modification" creates a brand new string in memory. No in-place edits. Ever. • UTF-16 encoding explains the weird .length behavior "😀".length === 2, not 1. Emojis and many Unicode characters use two code units — not one. • Primitive vs Object — they are NOT the same "hello" and new String("hello") behave differently in comparisons, typeof checks, and method calls. Mixing them up causes silent bugs. • charCodeAt() is the wrong tool for Unicode Use codePointAt() and String.fromCodePoint() instead. They handle characters outside the Basic Multilingual Plane correctly. • Tagged templates are massively underused Template literals aren't just cleaner concatenation. Tagged templates power SQL sanitization, CSS-in-JS libraries, and GraphQL query builders. • Intl.Segmenter exists for a reason Splitting text by spaces breaks for many languages. Intl.Segmenter handles proper word and grapheme segmentation — essential for i18n. • V8 doesn't store strings the way you think Internally, V8 uses ConsStrings, SlicedStrings, and String Interning to avoid redundant allocations and boost performance behind the scenes. 𝗞𝗲𝘆 𝗧𝗮𝗸𝗲𝗮𝘄𝗮𝘆 Understanding strings deeply = cleaner, safer, more performant code. The smallest data type often teaches the biggest engineering lessons. What's a string behavior that caught you off guard? Drop it below #JavaScript #WebDevelopment #FrontendDevelopment #V8Engine #Programming #SoftwareEngineering #LearningInPublic #DeveloperJourney #ECMAScript
To view or add a comment, sign in
-
I built a JS Minifier that does more than just remove whitespace. 🛠️⚡ Most online minifiers are "black boxes." You paste code, and you get a mess back. I wanted to build something that helps developers understand how their code is being transformed. The Engineering Details: AST Debugging : Built-in visualization using acorn to inspect the Abstract Syntax Tree. Zero UI Lag : Minification runs in a Web Worker, keeping the main thread free for a 60fps experience. Modern Compatibility: Fully supports ES2024+ syntax, powered by Terser. Smart State: Persistent configuration via localStorage and a responsive UI using react-resizable-panels. Mangle & Compress: Smart variable renaming and dead-code removal. The Results: In my tests, I'm consistently seeing 40-60% size reductions in milliseconds. #JavaScript #WebDev #Performance #Frontend #VibeCoding
To view or add a comment, sign in
-
-
You’re still building forms manually from JSON? --- Every time I get a JSON response, I end up doing the same thing: → read structure → map fields → wire inputs → repeat… again --- It’s boring. It’s repetitive. And it shouldn’t exist in 2026. --- So I built something for myself: 👉 Paste JSON 👉 Get a working form instantly --- No setup. No backend. No config headaches. Just: JSON → UI --- Introducing: 🔧 JSON → Form (part of useSignal) 👉 https://lnkd.in/grSx-SEi --- It’s fully browser-native. Which means: - your data never leaves your machine - everything runs instantly - no dependency on any service --- This isn’t just a generator. It’s a way to: → skip repetitive UI work → prototype faster → actually focus on logic --- Try it once. You probably won’t go back to building forms manually. --- 💬 Curious — how are you handling JSON → forms today? #frontend #webdevelopment #javascript #reactjs #devtools #buildinpublic #productivity #developers #webdev
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development