Day 17 / 40 – Frontend Learning Challenge Today I learned about Arrays and Array Methods in JavaScript. An array is used to store **multiple values in a single variable**. It’s very useful when working with lists of data like users, products, or tasks. **Example of an Array** ```javascript const fruits = ["Apple", "Banana", "Mango", "Orange"]; ``` Each value in an array has an **index** starting from **0**. ```javascript console.log(fruits[0]); // Apple console.log(fruits[2]); // Mango ``` --- **Common Array Methods I Learned Today** **push()** – Adds an element to the end ```javascript fruits.push("Grapes"); ``` **pop()** – Removes the last element ```javascript fruits.pop(); ``` **shift()** – Removes the first element ```javascript fruits.shift(); ``` **unshift()** – Adds an element at the beginning ```javascript fruits.unshift("Strawberry"); ``` **length** – Returns the number of elements ```javascript console.log(fruits.length); ``` --- **Looping Through Arrays** ```javascript fruits.forEach(function(fruit) { console.log(fruit); }); ``` --- **Why Arrays Matter in Frontend Development** Arrays are everywhere in JavaScript: • Displaying lists of products • Rendering UI components in frameworks like React • Handling API data • Managing dynamic data Understanding arrays makes it much easier to work with **real-world web applications**. **Day 17 complete — continuing my journey to become a Frontend Developer.** #40DaysOfCode #JavaScript #FrontendDevelopment #WebDevelopment #LearningInPublic
Learning Arrays and Array Methods in JavaScript for Frontend Development
More Relevant Posts
-
Learning React can be overwhelming when you're not sure what to learn next. Many beginners jump between tutorials without a clear direction, which slows down their progress. To help solve this, I wrote a step-by-step React roadmap that breaks down the exact concepts developers should focus on to build strong frontend skills. The article covers: • Core React fundamentals • Important tools and concepts to master • A structured path for becoming job-ready If you're learning frontend development or planning to start with React, this roadmap can help you stay focused. Read the full article here: https://lnkd.in/diZDrM3G #React #FrontendDevelopment #WebDevelopment #JavaScript #Programming
To view or add a comment, sign in
-
🚀 TypeScript Basics Every Developer Should Know If you're learning TypeScript, understanding interface, type, union, intersection, and enum is a game changer. Here’s a simple breakdown 👇 🔹 interface vs type 👉 Use interface when defining the structure of objects: Great for APIs, classes, and scalable code Supports extension (inheritance) Allows declaration merging 👉 Use type when you need flexibility: Works with primitives, unions, tuples, and functions Ideal for advanced type compositions Example: interface User { name: string; age: number; } type ID = string | number; 🔹 Union Types (|) Think OR — a value can be one of multiple types. type ID = string | number; ✔️ Accepts either string OR number 🔹 Intersection Types (&) Think AND — combines multiple types into one. type Person = { name: string }; type Employee = { salary: number }; type Worker = Person & Employee; ✔️ Must have BOTH properties 🔹 Enums Enums let you define a set of named constants — making your code more readable and less error-prone. enum Role { Admin, User, Guest } let userRole: Role = Role.Admin; 👉 You can also use string enums: enum Status { Success = "SUCCESS", Error = "ERROR", Loading = "LOADING" } ✔️ Great for: Fixed sets of values (roles, statuses, directions) Avoiding magic strings 💡 Quick Tip Use interface → for object structures Use type → for flexibility (unions, intersections, etc.) Use enum → for fixed, named values Mastering these concepts makes your TypeScript code more scalable, readable, and powerful. #TypeScript #WebDevelopment #JavaScript #Programming #Frontend #Developers
To view or add a comment, sign in
-
-
💡 Understanding Closures in JavaScript (My Learning Journey 🚀)💡 🔥Today, I explored one of the most important concepts in JavaScript — Closures 🔥 👉 A closure means: An inner function can access and remember the variables of its outer function, even after the outer function has finished execution. 🧠 What happens behind the scenes? 🔹 When JavaScript runs a program, it creates a Global Execution Context (GEC) and pushes it into the Call Stack. 🔹 Execution happens in two phases: 1️⃣ Memory (Creation Phase) 2️⃣ Code Execution Phase 🔹 When a function is invoked, a new Execution Context is created and pushed into the stack. 🔹 JavaScript follows lexical scope, meaning inner functions can access variables from their outer scope. 🔥 The Magic of Closures Even after the outer function completes execution and is removed from the call stack, the inner function still has access to the outer function’s variables. 👉 This is because the function maintains a reference to its lexical environment. 👉 Using the scope chain, JavaScript can still find and access those variables. 🎯 Key Concepts Involved ✅ Execution Context ✅ Call Stack ✅ Lexical Scope ✅ Scope Chain ✅ Closures 🚀 Why Closures are Powerful? ✔ Helps in data hiding (Encapsulation) ✔ Useful for maintaining state ✔ Used in callbacks and asynchronous programming ✔ Enables function factories 🔥 Conclusion Closures show how powerful JavaScript functions are. They don’t just execute — they remember where they were created. Understanding closures deeply helps in writing better and more efficient code. 💯 #JavaScript #Closures #WebDevelopment #FrontendDevelopment #CodingJourney #LearnInPublic #JSInternals #Developers
To view or add a comment, sign in
-
-
If you're learning JavaScript, here's a question I hear constantly from beginners: "I've learned functions — but now what do I actually learn next?" It's a genuinely good question. Functions are a major milestone, but the path forward isn't always obvious. We just published a detailed beginner's guide on Brain Busters that maps out the complete next step — in the right order, with real examples and clear explanations. The guide covers: → Conditional statements (if/else/switch) → Loops (for and while) → Arrays and how to work with them → Objects and key-value pairs → Array methods (forEach, map, filter) → The DOM — connecting JavaScript to real webpages → A 4-level roadmap from beginner to framework-ready No jargon. No assumptions. Written for someone who is genuinely at the start of their JavaScript journey. If you're learning JS or know someone who is — this is worth bookmarking. 🔗 https://lnkd.in/gYaKpYpV #JavaScript #WebDevelopment #LearnToCode #Programming #TechEducation
To view or add a comment, sign in
-
Day 11 of documenting my journey as a Front-End Developer — Introduction to JavaScript Today, I started learning JavaScript, and I had a big misconception at first—I thought JavaScript was an advanced version of Java. I learned that this is not true. JavaScript and Java are completely different languages. JavaScript was created by Brendan Eich and was originally called Mocha, then LiveScript, before being renamed JavaScript to attract Java developers. JavaScript is a high-level, interpreted programming language mainly used to make websites interactive. One thing that stood out to me is how JavaScript executes code—line by line (synchronously), meaning order matters. I also learned: . JavaScript files are saved as .js (e.g., app.js) . It is linked in HTML using: HTML <script src="app.js"></script> . The defer attribute is used when the script is placed in the <head> to delay execution until the HTML loads Interesting fact: Different browsers use different JavaScript engines: . Chrome ---V8 Engine . Firefox----- SpiderMonkey On comments I understood: . JavaScript uses // for single-line comments . /* */ can also be used (same as CSS) . But HTML comments (<!-- -->) do not work in JavaScript Lesson learned: Understanding the foundation of a language helps clear wrong assumptions before diving deeper. #FrontendDevelopment #JavaScript #WebDevelopment #LearningJourney #BeginnerMistakes #WomenInTech #softwareengineering #developer #learninginpublic #techcommunity #careergrowth
To view or add a comment, sign in
-
-
🚀 Day 7 / 21 — Frontend Challenge Today I built: 👉 Advanced To-Do App 🧠 Flow I designed before coding: • Structured tasks with key properties (text, completion status, etc.) • Planned core CRUD operations (Add, Edit, Delete, Toggle Complete) • Integrated localStorage for persistent data handling 🛠 Tech Used: HTML | CSS | JavaScript ✨ Features: • Add, edit, and delete tasks dynamically • Mark tasks as completed with a strike-through effect • Persistent data storage using localStorage 🚧 Challenges Faced: Implementing the edit functionality was challenging, especially ensuring that the correct task updates without affecting others. Managing consistent updates in localStorage after every operation also required careful logic and debugging. 💡 Key Learning: Breaking down complex features into smaller logical steps makes development more efficient and manageable. 🙏 Guidance by: Keyur Gohil 🏫 Learning at: Red & White Skill Education Official 📂 GitHub Repo: https://lnkd.in/dXZbRGBn #21DaysJSWithKeyur #RedandWhite #Skill #JavaScript #FrontendDevelopment #BuildInPublic #WebDevelopment
To view or add a comment, sign in
-
🚀 Day 6 / 21 — Frontend Challenge Today I built: 👉 To-Do App (Basic) 🧠 Flow I designed before coding: [1] Designed a simple form UI to take user input (task name) [2] Added event listener on "Add" button to capture and validate input [3] Managed tasks using an array + localStorage and updated UI dynamically 🛠 Tech Used: HTML | CSS | JavaScript | SweetAlert ✨ Features: [1] Add tasks with validation alerts using SweetAlert [2] Delete tasks from the list and update instantly [3] Persist tasks using localStorage and display in a table 🚧 Challenges Faced: Handling validation and empty inputs properly was tricky at first. Initially, tasks were getting added even when the input was empty or invalid. I solved this by integrating SweetAlert for better user feedback and adding proper condition checks before pushing data into the array. Also faced difficulty syncing UI with localStorage after delete, but fixed it by updating storage every time data changes. 💡 Key Learning: Planning before coding makes development faster & cleaner 🙏 Guidance by: Keyur Gohil 🏫 Learning at: Red & White Skill Education Official 📂 GitHub Repo: https://lnkd.in/dSDUik_a #21DaysJSWithKeyur #RedandWhite #Skill #JavaScript #FrontendDevelopment #BuildInPublic #WebDevelopment
To view or add a comment, sign in
-
I just finished JavaScript: The Good Parts by Douglas Crockford on Frontend Masters, and this course really challenged how I think about writing JavaScript. One of the biggest takeaways for me is that not all features of a language are equally good — and just because something exists doesn’t mean you should use it. Writing better code is often about choosing a smaller, safer subset of the language. I also found it interesting how much programming is about thinking clearly. Good code isn’t just for machines — it’s for people. Style, structure, and clarity directly impact how easy code is to understand and maintain. Another concept that stood out was how powerful functions really are in JavaScript. Instead of relying on classes, JavaScript leans on functions, closures, and prototypes to build flexible and reusable patterns. Learning more about prototypal inheritance, object behavior, and patterns like modules gave me a deeper understanding of how JavaScript actually works under the hood. I also liked the emphasis on avoiding confusing code — things like global variables, tricky syntax, or unclear structures can easily introduce bugs, even if the code “works”. What I’m taking from this is a shift toward writing simpler, more intentional code — focusing on clarity, reliability, and reducing unnecessary complexity.
To view or add a comment, sign in
-
-
🚀 JavaScript Simplified Series — Day 40 🎉 40 Days… 40 Posts… 1 Goal → Master JavaScript from scratch 🚀 If you’ve followed till here… You didn’t just learn JS — 👉 You built discipline 👉 You built consistency 👉 You built a developer mindset 🔥 What You’ve Covered From basics to advanced 👇 ✔ Variables, Data Types ✔ Operators, Conditions ✔ Loops ✔ Functions ✔ Arrays & Objects ✔ DOM & Events ✔ Async JavaScript ✔ Promises & Async/Await ✔ Event Loop ✔ Closures, Scope, Hoisting ✔ Prototypes & Classes ✔ Inheritance & Modules ✔ Debounce & Throttle 👉 This is not beginner level anymore 😎 🔥 Realization Moment At the start: 👉 “JavaScript is confusing” Now: 👉 “I can build things with JavaScript” That’s the real transformation 💯 🎁 Bonus for You I’ve also created complete JavaScript notes 📒 covering everything from this series 👉 Clean 👉 Beginner-friendly 👉 Quick revision ready If you want the notes 👇 💬 Comment “JS NOTES” or DM me — I’ll share it with you 🔥 What Next? Don’t stop here ❌ Start building: 👉 Projects (Todo App, Weather App) 👉 Frontend (React) 👉 Backend (Node.js) 👉 Full Stack Apps 🔥 Final Advice 👉 Don’t just watch tutorials 👉 Build projects 👉 Break things 👉 Fix them That’s how real developers grow 💡 Programming Rule Learning ends when you stop building. Keep building. Keep growing.** 🙌 If this series helped you 👉 Like ❤️ 👉 Share 🔁 👉 Comment your learning 👇 Let’s grow together 🚀 --- 📌 Series Completed 🎯 Day 1 → What is JavaScript ... Day 40 → Complete JavaScript Journey Follow for more 🚀 #JavaScriptSimplified #javascript #webdevelopment #coding #programming #learninpublic #100DaysOfCode #frontenddevelopment #devcommunity #codingjourney #softwaredeveloper #techcommunity #dailylearning #LeetCode #DSA #CodingJourney #Consistency #ProblemSolving #SoftwareEngineering #KeepGoing #codeeveryday
To view or add a comment, sign in
-
Understanding Synchronous vs Asynchronous programming in JavaScript is essential for every web developer. JavaScript runs on a single-threaded environment, but it can still perform asynchronous operations using features like callbacks, promises, and async/await. In this tutorial, I explained: • What synchronous programming is • How asynchronous programming works in JavaScript • Practical examples to understand execution flow • Common mistakes developers make • Important interview questions This article is designed for students, beginners, and developers who want to strengthen their JavaScript fundamentals. Read the full article: https://lnkd.in/gNAU7KHG If you are learning JavaScript, this concept will help you understand how APIs, timers, and background tasks actually work. #JavaScript #WebDevelopment #Programming #FrontendDevelopment #Coding
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