🚀 Day 9/100 – #100DaysOfCode JavaScript & API Fundamentals Review Today I reviewed many core JavaScript concepts that are essential for modern web development. These topics help write cleaner code, handle APIs efficiently, and avoid common bugs. Here are the key areas I covered: 🔹 Variable Declarations Understanding the difference between var, let, and const and why let and const are preferred in modern JavaScript. 🔹 Functions & Syntax Improvements • Default Parameters • Template Strings • Arrow Functions These features make code shorter, cleaner, and easier to maintain. 🔹 Modern JavaScript Features • Spread Operator (...) • Object & Array Destructuring • Optional Chaining These tools make working with complex data much easier. 🔹 Working with Objects Explored utilities like Object.keys(), Object.values(), and Object.entries() for analyzing and looping through object data. 🔹 Core JavaScript Concepts Reviewed important fundamentals such as: • Scope (Global, Block, Function) • Hoisting • Closure • Callback Functions Understanding these deeply helps write more predictable and efficient code. 🔹 Data Types & Comparisons • Primitive vs Non-Primitive • null vs undefined • == vs === • Truthy & Falsy values These are common interview topics and critical for avoiding hidden bugs. 🔹 Array Power Methods Practiced using: map(), filter(), find(), reduce(), and forEach() These methods are the backbone of real-world data manipulation. 🔹 API Fundamentals Learned how client applications communicate with servers using APIs. Key concepts reviewed: • JSON (JSON.parse, JSON.stringify) • Fetch API • HTTP Methods (GET, POST, PATCH, DELETE) • Debugging API requests using the Network Tab and Status Codes 🔹 Async JavaScript Practiced using async/await to handle asynchronous operations in a cleaner and more readable way. Every day of this journey strengthens my understanding of JavaScript and modern web development. Looking forward to applying these concepts in real projects!! #100DaysOfCode #JavaScript #WebDevelopment #Frontend #APIs #AsyncJavaScript #MERN #SoftwareEngineering
JavaScript Fundamentals Review for Modern Web Development
More Relevant Posts
-
🚀 map(), filter(), reduce() in JavaScript (with Definitions + Examples) (Part:3) These 3 array methods are must-know if you want to get strong in JavaScript Example array: let arr = [1, 2, 3, 4, 5]; 1️⃣ map() → Transform data Definition: map() creates a new array by applying a function to each element. let result = arr.map((num) => num * 2); console.log(result); // [2, 4, 6, 8, 10] ✔️ Use when you want to modify every element 2️⃣ filter() → Select data Definition: filter() creates a new array with elements that satisfy a condition. let result = arr.filter((num) => num > 2); console.log(result); //[3, 4, 5] ✔️ Use when you want to pick specific values 3️⃣ reduce() → Combine data Definition: reduce() reduces the array to a single value by applying a function. let result = arr.reduce((acc, num) => acc + num, 0); console.log(result); // 15 ✔️ Use for sum, totals, complex calculations Key Differences: >> map → transforms each element >> filter → selects elements >> reduce → combines into one value 🎯 Important Note: >>> These methods do not change the original array (they return a new one) # forEach() vs map() : 1️⃣ forEach() >> Executes a function for each element >> Does NOT return anything let result = arr.forEach((num) => { return num * 2; }); console.log(result); // undefined 2️⃣ map() >> Transforms each element >> Returns a NEW array let result = arr.map((num) => num * 2); console.log(result); // [2, 4, 6] #JavaScript #Frontend #WebDevelopment #Coding #LearnInPublic
To view or add a comment, sign in
-
Stop using `new CustomEvent()`. There is a much better way to handle events in JavaScript. 1. The old habit For years, we have used `CustomEvent` to pass data around. It works, but it has flaws. You have to wrap your data inside a detail property. It feels clunky and "unnatural" compared to other objects. 2. The problem with CustomEvent It creates friction in your code: - The syntax is verbose. - You cannot access your data directly (you always need .detail). - It is difficult to type correctly in TypeScript. 3. The modern solution You don't need `CustomEvent` anymore. You can simply create your own class and extend `Event`. It looks like this: class UserLoginEvent extends Event { ... } 4. Why is it better? Subclassing `Event` is the standard way now. It offers clear advantages: - It uses standard JavaScript class syntax. - Your data sits on the event itself, not inside .detail. - It is much easier to define types for your custom events. - It works in all modern browsers. 5. It is time to upgrade If you want cleaner, strictly typed events, try extending the native `Event` class. It makes your code easier to read and maintain. Do you still use `CustomEvent` or have you switched?
To view or add a comment, sign in
-
-
𝗝𝗮𝗵𝗮 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁: 𝗦𝘆𝗻𝘁𝗮𝗫, 𝗦𝘁𝗮𝘁𝗲𝗺𝗲𝗻𝘁𝘀, 𝗖𝗼𝗺𝗺𝗲𝗻𝘁𝘀 & 𝗩𝗮𝗿𝗶𝗮𝗯𝗹𝗲𝘀 JavaScript syntax is a set of rules that define how code must be written. JavaScript is case-sensitive. This means name, Name, and NAME are treated as different things. You use whitespace to make your code readable. - Hard to read: let x=5;let y=10;let z=x+y; - Easy to read: let x = 5; let y = 10; let z = x + y; A statement is a single instruction that tells JavaScript to do something. - let age = 25; declares a variable - console.log(age); prints the value to the console - alert("Hello, World!"); shows a popup in the browser Statements usually end with a semicolon. - let city = "Chennai"; is recommended - let city = "Chennai" also works, but avoid relying on this You can group multiple statements inside curly braces. - if (age > 18) { console.log("Adult"); console.log("Can vote"); } Comments are notes you write in your code. JavaScript ignores them when running the code. - Use // to comment out a single line - Use /* ... */ to comment across multiple lines A variable is like a labelled box - it stores a value that your program can use later. - var is the old way to declare variables - let and const are used in modern JavaScript Variable names must follow these rules: - Must start with a letter, underscore _, or dollar sign $ - Cannot start with a number - Cannot use reserved keywords You can update a variable's value. - var score = 10; - score = 20; updates the value If you declare a variable but don't assign a value, it holds the special value undefined. Key concepts: - Syntax: rules for writing valid JavaScript - Statement: a single instruction - Comment: notes in code ignored by JavaScript - Variable: a named container to store values Source: https://lnkd.in/gmeiXa5P
To view or add a comment, sign in
-
JavaScript often gets described as single threaded and non blocking. This confuses many developers. JavaScript runs on a single call stack. Only one piece of code executes at a time. Asynchronous behaviour comes from the browser environment. Web APIs handle tasks outside the call stack. Examples include setTimeout, fetch, and DOM events. When one of these tasks completes, the callback moves into the task queue. The event loop continuously checks two things. 1. Is the call stack empty. 2. Is there a callback waiting in the task queue. If the stack is empty, the event loop moves the first callback from the queue onto the stack. Example: console.log("Start") setTimeout(() => { console.log("Timer finished") }, 3000) for (let i = 0; i < 1e9; i++) {} console.log("End") What happens step by step. "Start" runs on the call stack. setTimeout moves to the Web API environment with a 3000ms timer. The loop blocks the call stack. After 3000ms the callback enters the task queue. The event loop waits because the stack remains busy. Once the loop finishes, the stack clears. The event loop pushes the callback onto the stack. Output Start End Timer finished The key point. 3000ms is the minimum delay. The callback runs only after the stack becomes free.
To view or add a comment, sign in
-
🔹 Async JavaScript — Lecture 2 | Callbacks Explained (Real Use Case) Callbacks are the foundation of asynchronous JavaScript. Before Promises and async/await, everything was built using callbacks. 🎯 What is a Callback? A callback is a function passed as an argument to another function, executed later. Example function fetchData(callback){ setTimeout(() => { console.log("Data received"); callback(); }, 2000); } function processData(){ console.log("Processing data..."); } fetchData(processData); Output: Data received Processing data... ❌ Problem — Callback Hell login(user, () => { getData(() => { processData(() => { showResult(); }); }); }); This becomes: ❌ Hard to read ❌ Hard to debug ❌ Not scalable 💡 Senior Developer Insight Callbacks are still used in: ✔ Event listeners ✔ Node.js core modules ✔ Legacy systems But modern apps avoid deep nesting. 🔎 SEO Keywords: JavaScript callbacks, async JS callbacks, callback hell explained, MERN stack async programming #JavaScript #MERNDeveloper #NodeJS #AsyncProgramming #WebDev
To view or add a comment, sign in
-
-
📌 JAVASCRIPT VS A.I AUTOMATION As a developer using JavaScript, this is in connecting with the scopes of JavaScript. The Scope of JavaScript refers to the visibility of variable and functions within a program of codes. Which are: 1. Global scope: this variable is visible anywhere in the javascript program. 2. Function scope: this is a variable created when a function is declared and it's variable and functions are only visible withing that function. A sample of it is: Function funName(){ var fs = "..." alert (fs); console.log(fs); } funName(); Now looking at this, A.I codes misinterprets the function scopes and genrate codes that carries just global scopes or even most times Interchange function scopes with global scopes when giving a variable function. 📌 The risk of this common error in our program will not appear at the beginning of the project but during debugging and code maintenance. Wonder why JavaScript bugs gives you sleepless nights? This is one of the main reasons. This is a call for developers and vibe coders to learn the intimate differences between GLOBAL SCOPE VARIABLES and FUNCION SCOPE VARIABLES. You A.I JavaScript code can cause you harm later if you do not learn this earlier. 📌 A.I. frequently misunderstands Hoisting and the Temporal Dead Zone (TDZ) when creating nested functions. It often defaults to legacy var logic within closure loops (because the bulk of the training data still uses it) rather than modern let or const for block scoping. It optimizes for visual syntax, not runtime safety. Automation without technical intuition creates technical debt. Want more daily strategy from the cutting edge of web infrastructure? connect with snow works #WorksTechnology #JavaScriptMastery #CodingArchitecture #AIPerformance #TechnicalIntuition #WebArchitecture #SoftwareDesign #WebDevStrategy
To view or add a comment, sign in
-
-
🚀 Web APIs in JavaScript If JavaScript is single-threaded… 👉 How does it handle setTimeout, fetch, or click events without freezing? The answer is Web APIs. What are Web APIs? 👉They are built-in features provided by the browser that allow JavaScript to interact with the web page and the outside world. 1. DOM API (Document Object Model) This lets you interact with HTML elements. ✔️ Change content ✔️ Add/remove elements ✔️ Handle user actions Example: document.getElementById("title").innerText = "Hello World!"; 2. Fetch API Used to get data from servers (APIs). ✔️ Fetch data from backend ✔️ Work with JSON ✔️ Build dynamic apps Example: fetch("https://lnkd.in/dQeGAVaB") .then(res => res.json()) .then(data => console.log(data)); 3. Timer APIs Helps you control time-based execution. ✔️ setTimeout → run once after delay ✔️ setInterval → run repeatedly Example: setTimeout(() => console.log("Hello after 2 sec"), 2000); 4. Geolocation API Access user's location (with permission). ✔️ Latitude & Longitude ✔️ Location-based apps 5. Web Storage API Store data in the browser. ✔️ localStorage (permanent) ✔️ sessionStorage (temporary) Example: localStorage.setItem("user", "Kavi"); 6. Event Handling API Respond to user actions like clicks, typing, etc. Example: button.addEventListener("click", () => { console.log("Button clicked!"); }); >>JavaScript is single-threaded, but Browser APIs + Event Loop make it feel asynchronous! #JavaScript #WebDevelopment #Frontend #Programming #BrowserAPIs #100DaysOfCode
To view or add a comment, sign in
-
Blog 07 of my JS Unlocked series is live! 🚀 Array Methods You Must Know in JavaScript 👇 Arrays store data. But these methods are what make that data actually useful — transform it, filter it, calculate from it. In this one I cover: ✅ push() & pop() — add/remove from the end ✅ shift() & unshift() — add/remove from the front ✅ forEach() — loop through every item cleanly ✅ map() — transform every item into a new array ✅ filter() — keep only what passes the condition ✅ reduce() — combine everything into one value ✅ Visual flowcharts for map, filter & reduce ✅ for loop vs map/filter — side by side comparison Would love your feedback if you read it 🙏 🔗 https://lnkd.in/d26hbMGM Thanks to Hitesh Choudhary Sir, Piyush Garg #JavaScript #WebDevelopment #Hashnode #WebDevCohort2026 #LearningInPublic #Frontend #JS
To view or add a comment, sign in
-
🚀 JavaScript Fundamentals Series — Part 1 Before learning frameworks, async code, or complex patterns… you need to understand the core building blocks of JavaScript. Everything in JavaScript starts with variables and data types. In this guide you'll learn: • var, let, and const differences • Primitive vs Reference types • How JavaScript stores data in memory • Why type coercion causes weird bugs • Common mistakes developers make If your foundation here is strong, the rest of JavaScript becomes MUCH easier. I wrote a full guide explaining it clearly with diagrams and examples. Read here 👇 https://lnkd.in/dz_TuuVT Hitesh Choudhary Chai Aur Code Piyush Garg Akash Kadlag #javascript #webdevelopment #coding #learnjavascript
To view or add a comment, sign in
-
𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄 𝗣𝗿𝗲𝗽𝗮𝗿𝗮𝘁𝗶𝗼𝗻: 𝗠𝗼𝘀𝘁 𝗔𝘀𝗸𝗲𝗱 𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀 Keeping it simple and practical. ✨ Focus on 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 𝗙𝘂𝗻𝗱𝗮𝗺𝗲𝗻𝘁𝗮𝗹𝘀, 𝗕𝗿𝗼𝘄𝘀𝗲𝗿 𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀 𝗮𝗻𝗱 𝗥𝗲𝗮𝗹 𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄 𝗤𝘂𝗲𝘀𝘁𝗶𝗼𝗻𝘀. --- 1. JavaScript Basics Interviewers Test • Primitive vs Non-Primitive data types • typeof operator • null vs undefined • NaN behaviour • Dynamic typing in JavaScript → These questions test whether you actually understand JavaScript fundamentals. --- 2. ES6 Features (Frequently Asked) • Arrow functions • Template literals • Destructuring • Enhanced object literals • Promises → ES6 introduced features that made modern JavaScript cleaner and more powerful. --- 3. Variables & Hoisting One of the most common interview topics. Understand clearly: • var vs let vs const • Block scope vs function scope • Hoisting behaviour • Temporal Dead Zone → Most developers use these daily but fail to explain them in interviews. --- 4. Functions & Execution Context Important topics interviewers ask: • Arrow functions • Traditional functions • this keyword behaviour • call(), apply(), bind() → Understanding execution context shows how deeply you know JavaScript. --- 5. Functional Programming Concepts Modern JavaScript relies heavily on these: • Higher Order Functions • map() • filter() • reduce() → These methods appear in almost every frontend codebase. --- 6. Scope & Closures One of the most important JavaScript concepts. Understand: • Global scope • Local scope • Scope chain • Closures → Closures are asked in almost every frontend interview. --- 7. Browser Concepts Frontend developers must know: • DOM (Document Object Model) • BOM (Browser Object Model) • Event handling → These concepts explain how JavaScript interacts with the browser. --- 8. One Truth About JavaScript Interviews Frameworks change every few years. But 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 𝗳𝘂𝗻𝗱𝗮𝗺𝗲𝗻𝘁𝗮𝗹𝘀 never change. If your fundamentals are strong, you can learn React, Angular or any framework easily. --- 📌 Save this post for your next frontend interview revision. --- Follow M. WASEEM ♾️ For insights on: • Full Stack Development • DSA • GenAI • System Design • Software Engineering #JavaScript #WebDev #CodingJourney #LearningToCode #Frontend #Programming
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