🔍 Day 168 of #200DaysOfCode Today, I focused on filtering specific values from an array — in this case, extracting only odd numbers using basic loop logic in JavaScript. ✔ This exercise reinforces how important condition checking is while working with data. ✔ Instead of using advanced built-in methods like .filter(), I wrote the logic manually — which improves clarity and confidence in how loops operate. ✅ What I practiced today: • Iterating through arrays • Checking conditions using modulo % • Selectively pushing results into a new array • Handling edge cases (like when no odd numbers exist) 🌱 Filtering is a skill that scales — from small number lists to large datasets powering real-world apps. Strong fundamentals → Strong code → Strong developer 💪 #JavaScript #168DaysOfCode #CodingChallenge #BackToBasics #LearnInPublic #ProblemSolving #WebDevelopment #DeveloperMindset #LogicBuilding
"Filtering odd numbers in JavaScript: Day 168 of #200DaysOfCode"
More Relevant Posts
-
🚀 Day 7 of My 30 Days of JavaScript Challenge 🧩 Problem: Array Reduce Transformation (LeetCode #2626) Given an integer array nums, a reducer function fn, and an initial value init, return the final reduced value. You must solve this without using the built-in Array.reduce() method. 💻 Language: JavaScript 📖 Problem Link: https://lnkd.in/eDiXhyPm 💡 Solution: https://lnkd.in/ezvK8_tY 🧠 Concepts Used Higher-order functions Accumulator pattern Sequential computation Understanding reduce() core logic 📚 Takeaway Rebuilding reduce() helps you understand how JavaScript aggregates data step by step. This concept is foundational for advanced topics like state management, data pipelines, and functional transformations. #Day7 #JavaScript #30DaysOfCode #LeetCode #WebDevelopment #FunctionalProgramming #CodingChallenge #FrontendDevelopment #100DaysOfCode
To view or add a comment, sign in
-
🧩 #100DaysOfCode – Day 32 | JavaScript Variables & Data Types 💛 Moving deeper into JavaScript! 🚀 Today I learned about variables — the containers that hold data — and data types, which define what kind of value we store. 💡 🔑 Key Points: 🟢 var, let, const → used to declare variables. 💬 Data Types: String → "Hello" Number → 25 Boolean → true / false Array → [1, 2, 3] Object → {name: "Shalini", age: 19} 💡 “Variables are like storage boxes — label them right, and coding becomes smooth!” 🌸 #100DaysOfCode #Day32 #JavaScript #FrontendDevelopment #CodingJourney #LearnByDoing #WebDevelopment #WomenInTech
To view or add a comment, sign in
-
-
🚀 𝗗𝗮𝘆 𝟮𝟯 𝗼𝗻 𝗟𝗲𝗲𝘁𝗖𝗼𝗱𝗲 Today I tackled one easy and one medium problem -- focusing on using objects to efficiently track array elements and their counts. 🧠 𝗜 𝘀𝗼𝗹𝘃𝗲𝗱: 🔹 1207. Unique Number of Occurrences 🔹 287. Find the Duplicate Number 💡 𝗞𝗲𝘆 𝘁𝗮𝗸𝗲𝗮𝘄𝗮𝘆: Objects can be super useful when you need to count, track, or compare array members efficiently. A solid step toward better data handling in JS 💪 #LeetCode #JavaScript #LearnInPublic #BuildInPublic #ProblemSolving #100DaysOfCode #WebDevJourney
To view or add a comment, sign in
-
-
JavaScript for 15 Days – Day 3: Data Types Every value in JavaScript has a data type, it tells the program what kind of data we’re working with. Today, you'll explore the difference between primitive and non-primitive data types, and how JavaScript uses them to store and process information. Primitive types: String, Number, Boolean, Null, Undefined, Symbol, BigInt Non-primitive types: Object, Array, Function Example 👇 let name = "Moussa"; // String let age = 27; // Number let skills = ["JS", "HTML", "CSS"]; // Array 💡 Lesson learned: Understanding data types makes debugging easier and helps you write cleaner, more reliable code. #JavaScript #FrontendDevelopment #WebDevelopment #CodingJourney #LearnToCode #15DaysJS #DevPerDay
To view or add a comment, sign in
-
Arrays are one of the most powerful data structures in JavaScript — and what makes them even more useful are array methods. These built-in functions allow developers to handle data efficiently without writing complex loops or extra logic. With array methods, you can easily add, remove, search, sort, filter, or transform data in just a single line of code. Functions like map(), filter(), reduce(), push(), and forEach() help simplify everyday coding tasks and make your programs more readable and efficient. They not only save time but also improve code quality — helping you focus on problem-solving instead of repetitive operations. In short, mastering array methods isn’t just about knowing syntax — it’s about writing cleaner, faster, and smarter JavaScript code that performs beautifully in real-world applications. #JavaScript #WebDevelopment #FrontendDevelopment #JavaScriptConcepts #JavaScriptDeveloper #LearnJavaScript #Coding #Programming #FrontendDeveloper
To view or add a comment, sign in
-
-
#100DaysLearningChallenge with Saurabh Shukla Sir. 🎯 Day 19: Set in JavaScript — Ensuring Uniqueness and Efficiency 🔁✨ Yesterday, I worked with the Priority Queue, mastering how priorities influence data processing. Today, I explored another powerful built-in data structure — the Set — a simple yet efficient way to manage unique collections of values in JavaScript. 🧠 What’s a Set? A Set is a special type of collection that stores unique values, whether primitive types or object references. It automatically removes duplicates, making it a great tool for scenarios where uniqueness is essential. 🛠️ What I learned and implemented: ✅ Created and managed Sets to store unique data ✅ Added, deleted, and checked elements efficiently ✅ Explored key Set methods like add(), delete(), has(), and clear() ✅ Practiced converting between Arrays and Sets ✅ Used Sets to eliminate duplicates from arrays effortlessly 📂 Real-world use cases: ➡️ Removing duplicates from data collections ➡️ Managing unique user IDs or tokens ➡️ Tracking visited nodes in graph algorithms ➡️ Optimizing lookups and membership checks 👨💻 Sets may seem simple, but they play a crucial role in writing cleaner, faster, and more reliable code. 📒 Try creating your own examples — experiment with methods and combine Sets with other data structures for powerful results! 📹 Video reference (MySirG): https://lnkd.in/gfu-c8Tb 💻 Source Code (GitHub): https://lnkd.in/gStvbMtw 🚀 From managing priorities to maintaining uniqueness — every day, one concept stronger! #100DaysLearningChallenge #Day19 #Set #JavaScript #DataStructures #CleanCode #LearningInPublic #DevJourney #AlgoDaily #CodeSmart
Set Data Structure in JavaScript | Duplicate हटाओ Boss! | JS में Set का Magic Explained
https://www.youtube.com/
To view or add a comment, sign in
-
🟦 Day 182 of #200DaysOfCode Today, I explored one of the most important concepts in JavaScript data handling — ✨ Deep Cloning a Nested Object Manually. In JavaScript, objects are stored by reference. So if you simply assign or shallow copy an object, any nested changes will still affect the original one. To truly create an independent copy, we need a deep clone — where every nested level is recreated. 🔍 What I built: A custom deepClone() function that: ✔ Loops through every key in the object ✔ Checks if a value is another object ✔ Uses recursion to clone deeply nested structures ✔ Returns a completely separate copy Why this matters? Deep cloning is essential when working with: • React state management • Redux reducers • Complex forms • API response manipulation • Saving snapshots of data without mutation 🧠 Key Takeaways: • Understanding reference vs value is crucial in JS • Recursion is a powerful tool for traversing deep structures • Manual deep cloning builds strong mental models of how objects behave • These fundamentals help you write safer, more predictable code This was one of those exercises where a simple concept reveals a deeper layer of how JavaScript actually works behind the scenes. Master the basics → scale effortlessly into advanced topics. #JavaScript #182DaysOfCode #LearnInPublic #DeepClone #Recursion #ProblemSolving #WebDevelopment #LogicBuilding #CodingChallenge #DeveloperMindset #ObjectsInJS
To view or add a comment, sign in
-
-
Every time you write for (...) if (...) {...} you’re telling the computer how to work. Always Ask: “What’s the transformation?” and reach for .map(), .filter(), .reduce(). Stop managing steps. Start shaping data flows. Below is a code that lets us chunk by predicate. For more insights check this book https://lnkd.in/d4Ft9KDX #Javascript #CleanCode #FunctionalProgramming
To view or add a comment, sign in
-
-
🚀 Day 7 of My 30 Days of JavaScript Journey ✅ Challenge: Array Reduce Transformation (LeetCode #2626) Write a function reduce(nums, fn, init) that processes each element of the array using the given reducer function fn, starting from an initial value init. This function should accumulate results sequentially and return the final value — implemented without using the built-in Array.reduce() method. 💻 Language Used: JavaScript ❓ Problem Link: https://lnkd.in/gxsp26cz 💡 Solution: https://lnkd.in/giZj_hYw 🧠 Concept Highlighted: This problem deepened my understanding of accumulator functions, data aggregation, and sequential computation in JavaScript. It helped me explore how the powerful reduce() method works behind the scenes — a key tool for transforming and summarizing data efficiently. #Day7 #JavaScript #LeetCode #30DaysOfCode #CodingChallenge #WebDevelopment #FrontendDevelopment #LearningEveryday #ProblemSolving #FunctionalProgramming
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