Day 17 of Learning JavaScript 🚀 Today I learned how to change content using JavaScript. Example: element.textContent = "Hello World" This simple line can update the UI dynamically. Now I understand how websites update content without reloading. #javascript #frontenddeveloper
Learning JavaScript: Dynamic UI Updates
More Relevant Posts
-
🚀 Exploring Asynchronous JavaScript Concepts 💡Today I worked on understanding how JavaScript handles asynchronous execution using setTimeout and setInterval. Here are some interesting learnings: 🔹 Difference between let and var inside loops with setTimeout Using let creates a new value for each iteration → outputs: 0, 1, 2 Using var shares the same variable → outputs: 3, 3, 3 🔹 Understanding setInterval It runs repeatedly after a fixed time interval We can control it using clearInterval to stop execution when needed 🔹 Understanding setTimeout It runs only once after a delay We can cancel it using clearTimeout before execution 💡 Key Takeaways: 🔹JavaScript executes loops synchronously, but timers (setTimeout, setInterval) run asynchronously 🔹Variable scope (let vs var) plays a crucial role in async behavior Proper control of timers is important to avoid unexpected outputs 🔹This practice helped me better understand the event loop, execution flow, and timing functions in JavaScript. 🚀Consistency and clarity are helping me improve step by step 🚀 #JavaScript #AsyncJavaScript #WebDevelopment #CodingJourney #FrontendDevelopment #LearningInPublic
To view or add a comment, sign in
-
🔑 Mastering the this keyword in JavaScript! Understanding this can be a game-changer for your JavaScript journey! It can be tricky, but once you get it, your code will be more dynamic and powerful. Here’s a quick breakdown: 🌍 Global Context: In the global scope, this refers to the global object (like window in browsers). 🏠 Object Method: When used inside an object method, this refers to the object itself. 🛠️ Function Context: In regular functions, this defaults to the global object (or undefined in strict mode). 🏃♂️ Arrow Functions: They do not have their own this; they inherit it from the parent scope. 💡 Pro Tip: Use bind(), call(), or apply() to explicitly set the value of this. Follow ABDUL REHMAN ♾️ For More Updates 👍👍 Learn more from w3schools.com , JavaScript Mastery ✨ #JavaScriptTips #WebDevelopment #CodingInsights
To view or add a comment, sign in
-
🚀 Day 4 of Learning JavaScript – Functions Completed! Today I learned one of the most important concepts in JavaScript: **Functions** 💻✨ 🧠 Key concepts I practiced: ✔ What are functions and why we use them ✔ Functions with parameters (inputs) ✔ Return values from functions ✔ Building a mini calculator using functions ✔ Even / Odd number checker logic 💡 What I understood: Functions help us write reusable and clean code. Instead of repeating the same code again and again, we can wrap it inside a function and use it whenever needed. 🔥 Mini Projects I built today: 👉 Calculator function (+, -, *, /) 👉 Even/Odd checker function This step really improved my logical thinking and problem-solving skills in JavaScript. 📌 Next step: DOM (making web pages interactive) #JavaScript #WebDevelopment #CodingJourney #FrontendDevelopment #100DaysOfCode #LearningInPublic
To view or add a comment, sign in
-
-
Day 8 of My JavaScript Journey 🚀 Today, I started learning about functions in JavaScript. Functions are used to group and reuse code, making programs more organized and efficient. There are three types of functions: • Function declaration • Function expression • Arrow function Today, I focused on function declaration. Example: function greet(name) { return "Hello " + name; } One thing I noticed: Functions can feel a bit difficult at first, but they are a core part of JavaScript. So instead of rushing, I’m taking my time to truly understand how they work. Key takeaway: Mastering functions is essential because they are used everywhere in JavaScript. #JavaScript #WebDevelopment #LearningInPublic #100DaysOfCode
To view or add a comment, sign in
-
Built a simple Calculator using HTML, CSS, and JavaScript 🧮 — and it reminded me of something important: In the race to build “advanced” projects, we often overlook the power of getting the basics right. This project wasn’t about complexity. It was about: • Writing clean and structured code ✨ • Understanding how JavaScript interacts with the DOM 🔗 • Strengthening problem-solving at a fundamental level 🧠 Because at the end of the day, every complex system is built on simple logic done well. As a student, I’m focusing on building strong foundations—one project at a time. 🚀 @InternPe #WebDevelopment #JavaScript #Frontend #LearningJourney
To view or add a comment, sign in
-
Built a simple Calculator using HTML, CSS, and JavaScript 🧮 — and it reminded me of something important: In the race to build “advanced” projects, we often overlook the power of getting the basics right. This project wasn’t about complexity. It was about: • Writing clean and structured code ✨ • Understanding how JavaScript interacts with the DOM 🔗 • Strengthening problem-solving at a fundamental level 🧠 Because at the end of the day, every complex system is built on simple logic done well. As a student, I’m focusing on building strong foundations—one project at a time. 🚀 @InternPe #WebDevelopment #JavaScript #Frontend #LearningJourney
To view or add a comment, sign in
-
Day 3/200🚀 Understanding JavaScript Closures, Scope & setTimeout Today I explored a tricky but important JavaScript concept while experimenting with setTimeout, var, and let. 🔹 What I Learned: JavaScript executes synchronous code first, then asynchronous callbacks setTimeout does NOT store values, it stores a function (closure) Closures capture variables by reference, not by value var uses a single shared variable let creates a new variable for each iteration 🔹 The Problem I Faced: I expected this code to print 0 1 2, but it printed 3 3 3 🔹 Why It Happened: Loop finished execution first i became 3 All callbacks accessed the same variable reference 🔹 Solution: Using let instead of var creates a new binding for each iteration, giving the expected output. 💡 Key Takeaway: “Closures capture variables by reference. var shares one binding, while let creates a new binding per iteration.” #JavaScript #WebDevelopment #Frontend #NodeJS #LearningInPublic #Coding
To view or add a comment, sign in
-
-
🚀 Understanding Callback Functions & Callback Hell in JavaScript 💻 Hey everyone! 👋 👇Today I explored two important concepts in JavaScript — Callback Functions and Callback Hell. Sharing my learning in a simple way 👇 🔹 1. Callback Function A callback function is simply a function passed as an argument to another function and executed later. 👉 Example: I created a function sqrt and passed it into another function process The process function calls it with a value (5) 💡 Output: ✔️ It calculates the square → 25 ✨ This shows how functions can be reused and executed dynamically! 🔹 2. Callback Hell 😵💫 When callbacks are nested inside multiple callbacks, it creates a pyramid-like structure, making code: ❌ Hard to read ❌ Difficult to debug ❌ Messy to maintain 👉 Example flow: Step1 ➡️ Step2 ➡️ Step3 ➡️ Final Output 📌 Output: ✔️ Hii I am step1 ✔️ Hello I am step2 ✔️ Hii I am step3 ✔️ All done.. ⚠️ Why is it called "Callback Hell"? Because too many nested callbacks look like a "pyramid of doom" 🔺 and make code confusing! ✅ Better Alternatives To avoid callback hell, we can use: ✨ Promises ✨ Async/Await These make code cleaner and easier to understand 👍 💬 My Learning: Understanding callbacks is the first step toward mastering asynchronous JavaScript 🚀 🔖 #JavaScript #WebDevelopment #CodingJourney #FrontendDevelopment #Callbacks #AsyncJS #LearningInPublic
To view or add a comment, sign in
-
🚀 Is JavaScript Single-Threaded? Most beginners get confused here… 😵 Let’s make it simple 👇 🧠 JavaScript is Single-Threaded 👉 It runs one task at a time 👉 Code executes line by line (synchronously) 😵 But then… How does it handle things like: 👉 setTimeout 👉 API calls 👉 Promises ⚡ The answer: Event Loop 👉 JS uses: ✔ Call Stack ✔ Web APIs ✔ Callback Queue ✔ Event Loop 💡 What actually happens? 👉 Async tasks go to Web APIs 👉 Then move to Callback Queue 👉 Event Loop pushes them back to Call Stack 🔥 Final Understanding: 👉 JavaScript = Single-threaded 👉 But handles async tasks smartly ⚡ One line to remember: 👉 “JS is single-threaded but non-blocking” 💬 Was this confusing before? Now clear? 📌 Save this — this is a must-know for interviews #javascript #webdevelopment #frontend #coding #programming #javascriptdeveloper #learncoding #developers #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 71 | Practice of All Function Types Today I focused on practicing all types of functions in JavaScript 💻 🔹 What I Worked On: • Practiced function declaration and function expression • Worked with functions using parameters and return values • Revised anonymous functions and arrow functions • Implemented higher-order functions and callbacks • Practiced recursive functions with different examples • Revisited IIFE and object methods 💡 Key Learning: • Practice helps in understanding when to use each type of function • Improved confidence in writing and structuring functions • Better clarity on real-world usage of callbacks and recursion 🔥 Takeaway: 👉 The more you practice functions, the stronger your JavaScript foundation becomes Consistency is turning concepts into skills 🚀 #Day71 #JavaScript #Functions #Practice #ProblemSolving #CodingJourney #10000Coders #FrontendDeveloper #SravanKumarSir
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