30 Days JavaScript Challenge : Day 27 ✅ Today’s problem was about creating a compact object basically removing all falsy values from an object or array, even if they are nested. At first glance it looks easy, but once nested structures come in, it gets interesting. This problem really tests your understanding of: Falsy values (null, 0, false, "", etc.) Recursion for nested objects/arrays Treating arrays like objects (since indices are keys) It’s one of those questions that feels very practical like cleaning API responses or filtering unwanted data before using it. Definitely helped me think more deeply about how JavaScript handles data structures. Almost at the end now… consistency paying off 🚀 #javascript #leetcode #webdevelopment #frontenddeveloper #codingchallenge #learninginpublic #developers #programming #buildinpublic
Compact Object with No Falsy Values in JavaScript
More Relevant Posts
-
30 Days JavaScript Challenge: Day 23 ✅ Today’s problem was about building our own version of groupBy() something that’s actually super useful in real projects. The idea was simple: Take an array, run a function on each element, and group elements based on the key that function returns. What I liked about this one is how it makes you think about data transformation not just looping, but structuring data in a cleaner and more usable way. Something like: Group users by id Split numbers based on a condition Organize data for UI rendering All of this becomes much easier once you understand this pattern. Another small step, but feels like I’m getting better at writing cleaner and more practical JavaScript. #javascript #leetcode #webdevelopment #frontenddeveloper #codingchallenge #learninginpublic #developers #programming #buildinpublic
To view or add a comment, sign in
-
-
30 Days JavaScript Challenge : Day 26 ✅ Today’s problem was about flattening a multi-dimensional array, but with a twist we were given a depth n and had to flatten only up to that level. Not a full flatten, not a shallow one… somewhere in between. It really makes you think about recursion and depth control: When to go deeper When to stop How to keep track of current depth What I liked is how this problem builds intuition around nested data structures something you see a lot in real apps (APIs, configs, UI trees, etc.). Slowly getting more comfortable with recursion and thinking in layers. #javascript #leetcode #webdevelopment #frontenddeveloper #codingchallenge #learninginpublic #developers #programming #buildinpublic
To view or add a comment, sign in
-
-
📒 Just documented JavaScript Data Types in a clean handwritten format! Concepts feel much easier when you write and visualize them instead of just reading 📖✍️ Covered: ✔️ Primitive Types ✔️ Reference Types ✔️ Special Concepts like "typeof" & Dynamic Typing JavaScript is simple… but its behavior makes it powerful (and sometimes tricky 😄) Consistency in learning > speed 🚀 If you're learning JavaScript, start from the basics — they matter more than you think. 💬 What topic should I cover next? #JavaScript #WebDevelopment #CodingJourney #LearnToCode #Frontend #Programming #Developers #100DaysOfCode #Tech #CodeNewbie
To view or add a comment, sign in
-
-
Struggling to understand JavaScript array methods? 🤔 I used to memorize them… but it never worked. So I tried something different 👇 I started visualizing them. Now it’s much easier: • map() → transforms data • filter() → selects data • find() → gets first match • findIndex() → finds position • push() → adds item at end • pop() → removes last item • shift() → removes first item • unshift() → adds item at start Also learned an important concept: 👉 Some methods create a new array 👉 Some modify the original array This small shift made a big difference in my learning 🚀 Which method do you use the most? 👇 #JavaScript #WebDevelopment #FrontendDeveloper #Coding #LearnInPublic #100DaysOfCode #Programming #WebDev #SoftwareEngineering #Developers #Tech #CodingJourney #CodeNewbie #DevCommunity
To view or add a comment, sign in
-
-
Today I turned another part of my JavaScript learning into a mind map. After spending time on values, then on program structure, I wanted to go deeper into one of the most important values in JavaScript: functions. The more I study them, the more I see that functions are not just reusable blocks of code. They are closely connected to bindings, scope, lexical environment, closure, recursion, and the call stack. So I sketched this mind map to connect ideas like: - function declarations, function expressions, and arrow functions - local and global bindings - lexical scope - closure - recursion and the call stack What I find interesting is that functions seem simple at first, but the more you look closely, the more depth you discover. This exercise helped me see more clearly that learning JavaScript is not only about understanding syntax. It is also about understanding what really happens when code runs. Still learning, still refining, but this was another very useful step in the journey. #JavaScript #EloquentJavaScript #Programming #WebDevelopment #LearnInPublic
To view or add a comment, sign in
-
-
Maps and Sets in JavaScript: A Beginner-Friendly Guide JavaScript provides many ways to store and manage data. While Arrays and Objects are widely used, Maps and Sets are two powerful yet often overlooked data structures.... Read more → https://lnkd.in/dwk3yBJn #TheCampusCoders #Tech #Developers #Programming #WebDev
To view or add a comment, sign in
-
What are variables in JavaScript? Variables in JavaScript are used to store data that can be used and updated in your program. They act like containers for values such as numbers, strings, or objects. You can declare variables using let, const, or var. let allows changes, const is for values that shouldn’t change, and var is older and less commonly used. Choosing the right one helps avoid errors. Variables make your code flexible and reusable, allowing you to store user input, perform calculations, and manage data efficiently. #webdeveloper #tech #coding #programming
To view or add a comment, sign in
-
-
𝐃𝐚𝐲 𝟑/𝟏𝟓 𝐨𝐟 𝐦𝐲 𝐉𝐚𝐯𝐚𝐒𝐜𝐫𝐢𝐩𝐭 𝐉𝐨𝐮𝐫𝐧𝐞𝐲 🚀 3 days in… and I’m still showing up. Not perfect. Not fast. But consistent. 💡 What I learned: Operators in JavaScript Arithmetic operators (+, -, *, /) Comparison operators (==, ===, !=) Logical operators (&&, ||) 🧠 What I understood: JavaScript is not just about storing data… It’s about working with it. For example: Adding numbers Comparing values Checking conditions At first, I thought == and === are the same… But they’re not. That small difference confused me a bit. But after trying examples, I got clarity. 📌 My biggest takeaway: Small differences matter a lot in coding. One symbol can completely change the result. Still learning. Still improving. See you on Day 4 🚀 #JavaScript #CodingJourney #LearningInPublic #Day3 #Consistency #WebDevelopment #Programming #Developers
To view or add a comment, sign in
-
-
Maps and Sets in JavaScript: A Deep Dive JavaScript provides several ways to store and manage data, with objects and arrays being the most commonly used structures. However, when dealing with unique values or key-value pairs with better effi... Read more → https://lnkd.in/dvP2-4nH #TheCampusCoders #Tech #Developers #Programming #WebDev
To view or add a comment, sign in
-
🚀 Garbage Collection in JavaScript Ever wondered what happens to unused memory? 🤔 Let’s make it simple 👇 🧠 What is Garbage Collection? 👉 It is the process of automatically removing unused memory 👉 JavaScript handles this for you (no manual memory management) ⚡ How does JS decide what to remove? 👉 Using Reachability ✔ Reachable = Still in use ❌ Unreachable = Garbage 💡 Simple Example: 👉 If no variable is referencing an object 👉 It becomes eligible for garbage collection 🔥 Algorithm Used: 👉 Mark & Sweep ✔ Mark → Identify reachable objects ✔ Sweep → Remove unreachable objects ⚡ Key Understanding: 👉 If no reference points to an object 👉 It gets removed from memory 🚨 Important Note: 👉 Garbage collection is automatic 👉 You cannot control when it runs 💬 Did this concept clear your doubt? 📌 Save this for interviews (very important topic) #javascript #webdevelopment #frontend #coding #programming #javascriptdeveloper #learncoding #developers #100DaysOfCode
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