Day 4 of #30DaysOfJavaScript: Mastering Array Transformations Without .map() 🚀 Today’s task was about thinking beyond built-in methods by writing a custom function to transform every element of an array, similar to how .map() works in JavaScript — but doing it all manually! My solution involved iterating over the input array and applying a transformation function to each element, building up a new array with the results: What I learned today: Reinforced fundamentals of array traversal and callback functions. Understood how helpful built-in methods like .map() are—and exactly how they work under the hood. Practiced writing cleaner, modular, and reusable code. Challenging myself with these basics is already making my JavaScript much stronger! On to Day 5 🔥 Are you also on a coding challenge journey? Let’s connect and learn together! #JavaScript #CodingChallenge #WebDevelopment #LearningByDoing #LeetCode #ProblemSolving #TechCommunity
Mastering Array Transformations Without .map() in JavaScript
More Relevant Posts
-
✨ Day 10 — How JavaScript Code Works Behind The Scenes! ✨ Today, I went beyond the syntax to understand how JavaScript actually executes code behind the scenes — the hidden engine that makes everything run! ⚙️💻 I began by learning about the Execution Context — the environment where JavaScript code runs — and how it’s created in two key phases: Memory Allocation and Execution. 🧠 Then, I explored how Function Call Execution Contexts are formed and managed using the Call Stack and Heap, helping me visualize how JavaScript handles both primitive values and objects in memory. 📚 I also dived deep into Hoisting, understanding why variables declared with var show up as undefined, and how let & const behave differently due to the Temporal Dead Zone. ⚡ Finally, I wrapped up by studying Function Expressions, Hoisting mechanics, and how the JavaScript Interpreter runs code step by step — truly connecting all the dots behind execution! 🚀 This session gave me a crystal-clear understanding of what happens before a single line of JavaScript runs — the real “magic” behind the language! ✨ #Day10 #JavaScript #WebDevelopment #100DaysOfCode #LearningEveryday #CodingJourney #FrontendDevelopment #Hoisting #ExecutionContext #JSBehindTheScenes
To view or add a comment, sign in
-
-
🔄 Day 163 of #200DaysOfCode After exploring advanced topics in JavaScript, I decided to slow down and revisit one of the most timeless logic challenges — reversing an array without using the built-in reverse() method. 🌱 It might seem like a simple exercise, but it teaches you something very powerful — how data moves in memory, how to swap values efficiently, and how small logic patterns build the foundation for solving complex problems later on. In JavaScript, it’s easy to rely on built-in functions, but when you write logic manually, you begin to understand the real mechanics behind how things work — and that’s what makes you a stronger developer. 💡 Problems like these remind me that mastery isn’t about how many advanced concepts you know, but how deeply you understand the basics. 🔁 Even experienced developers revisit their roots from time to time — because fundamentals never go out of style. Keep learning. Keep building. Keep evolving. #JavaScript #CodingChallenge #BackToBasics #163DaysOfCode #LearnInPublic #WebDevelopment #DeveloperMindset #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
🔄 Day 164 of #200DaysOfCode Today, I revisited another classic JavaScript problem — removing duplicates from an array without using Set() or advanced methods. 💡 While there are modern one-liners that can handle this task in seconds, manually writing the logic helps build a deeper understanding of how arrays, loops, and conditions work together. This small challenge reinforced two key lessons: 1️⃣ Efficiency matters — Writing logic by hand makes you think about time complexity and performance. 2️⃣ Simplicity is strength — The most effective solutions are often the ones built from fundamental principles. 🔁 As developers, it’s not just about knowing shortcuts — it’s about understanding the why behind every concept. Revisiting such basic problems sharpens logical thinking and improves our ability to write cleaner, more optimized code. 🌱 Mastering the basics is not a step backward — it’s the foundation for everything advanced. #JavaScript #CodingChallenge #BackToBasics #164DaysOfCode #LearnInPublic #DeveloperMindset #WebDevelopment #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
Day 5 of #30DaysOfJavaScript: Creating My Own Filter Function from Scratch! 🎯 Today, I tackled a great exercise that challenged me to build a custom filter function without using JavaScript’s built-in .filter() method. This involved iterating over an array and using a callback function to decide which elements to keep based on truthy values. Here’s a peek at the solution I wrote: Key takeaways from this challenge: Deepened my understanding of higher-order functions and callback usage. Learned how to evaluate truthy and false values in JavaScript more effectively. Gained appreciation for the power and convenience of built-in array methods by implementing one manually. This hands-on approach is helping me grasp fundamental JavaScript concepts in detail while preparing for real-world coding challenges. Excited to keep growing and solving more problems along the way! Let’s connect and share knowledge. #JavaScript #CodingChallenge #WebDevelopment #LeetCode #ArrayMethods #LearningByBuilding #DeveloperJourney
To view or add a comment, sign in
-
-
🚀 Day 5 of My 30 Days of JavaScript Challenge 🧩 Problem: Apply Transform Over Each Element in Array (LeetCode #2635) Given an integer array arr and a mapping function fn, return a new array such that: newArray[i] = fn(arr[i], i) Solve this without using the built-in Array.map() method. 💻 Language: JavaScript ❓ Question: https://lnkd.in/eq8qYfpb 💡 Solution: https://lnkd.in/eT5U2kBp 🧠 Concepts Used: Higher-order functions (passing functions as arguments) Loops and callback functions Core idea behind how .map() works internally 📚 Takeaway: By recreating the Array.map() method manually, I learned how callback execution and array transformations work under the hood — a must-know for mastering JavaScript fundamentals. #Day5 #JavaScript #30DaysOfCode #LeetCode #CodingChallenge #WebDevelopment #FrontendDevelopment #100DaysOfCode
To view or add a comment, sign in
-
Day 8 of #30DaysOfJavaScript: Counting Function Arguments with Rest Parameters! 🎯 Solved an interesting and fundamental problem today—writing a function that returns the count of arguments passed to it. This challenge sharpened my understanding of JavaScript’s rest parameters and how they simplify working with variable numbers of arguments. Here’s my solution: javascript var argumentsLength = function(...args) { return args.length; }; Key insights gained: rest parameters allow capturing an indefinite number of arguments in an array-like structure. This approach is cleaner and more intuitive than using the legacy arguments object. Mastering these basics is essential for writing flexible, reusable functions in JavaScript. Excited to keep progressing on this learning journey and uncovering more of JavaScript’s powerful features every day! If you’re also working through JavaScript fundamentals or coding challenges, let’s connect and share tips. #JavaScript #RestParameters #CodingChallenge #LeetCode #WebDev #LearningByDoing #SoftwareDevelopment
To view or add a comment, sign in
-
-
🚀 Starting My JavaScript Revision Journey! Body: Yesterday, I went back to the basics of JavaScript to strengthen my foundation. Here’s what I revised: 🟡 Variables — var, let, and const and when to use them 🟡 Scope — Global variables (accessible everywhere) — Local variables (accessible within a function/block) 🟡 Data Types — Primitive: string, number, boolean, null, undefined, symbol, bigint — Non-Primitive: objects, arrays, functions It’s amazing how revisiting fundamentals clears a lot of confusion! What JavaScript concept took you time to understand when starting out? #JavaScript #BackendDevelopment #LearningJourney #Coding
To view or add a comment, sign in
-
When everything else fails in 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁… Try going back to the basics 👇 I spent today revising some core concepts and honestly, it reminded me how small fundamentals make big differences in coding: 𝟭. 𝗢𝗽𝗲𝗿𝗮𝘁𝗼𝗿𝘀 𝗮𝗿𝗲𝗻’𝘁 𝗷𝘂𝘀𝘁 𝘀𝘆𝗺𝗯𝗼𝗹𝘀. They decide how your code thinks and reacts from arithmetic (+, -, %) to logical (&&, ||). 𝟮. 𝗛𝗼𝗶𝘀𝘁𝗶𝗻𝗴 𝗶𝘀𝗻’𝘁 𝗺𝗮𝗴𝗶𝗰, 𝗶𝘁’𝘀 𝗼𝗿𝗱𝗲𝗿. var gets hoisted (declared but undefined), let and const are hoisted too but live in a “temporal dead zone.” 𝟯. 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀 𝗹𝗼𝘃𝗲 𝘁𝗵𝗲 𝘀𝗽𝗼𝘁𝗹𝗶𝗴𝗵𝘁. Declarations are hoisted fully. Expressions? Not so much & they wait for their turn! It’s wild how a simple console.log() before a variable can teach you why order matters in JavaScript. Besides... When did debugging become about guessing? 😄 It’s really about understanding how JavaScript reads your code line by line. 𝗣.𝗦. Which JavaScript concept confused you most when you started? #Frontend #Webdevelopment #Javascript #Developer #Cohort2 #Learningjourney #Fundamental
To view or add a comment, sign in
-
-
Building a Basic Calculator in JavaScript 🔹 Ever wondered how to evaluate a math expression like '1 + (4 + 5 + 2) - 3' in JavaScript without using eval()? Here's a clean way to do it using stacks. Key Concepts: Stack for previous results and signs: Keeps track of nested parentheses. Sign management: Helps handle + and - correctly. Iterative parsing: Converts string digits into numbers. Avoids the dangers of eval(). Can handle nested parentheses. Shows how stack-based algorithms can solve real-world problems elegantly.
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