Day 6/30 – Build Your Own Filter Function in JavaScript 🧠 | No Array.filter() 🧠 Problem: Implement a filtering function without using Array.filter(). The function should: Take an array arr Use a function fn(value, index) Return a new array containing only truthy results ➡️ filteredArr includes elements where Boolean(fn(arr[i], i)) === true ✨ This challenge helped me deeply understand: Truthy vs Falsy values Conditional array processing How JavaScript array methods work internally Rebuilding core methods = stronger fundamentals 💪 💬 Share your approach or optimize mine in the comments! #JavaScript #30DaysOfJavaScript #CodingChallenge #ArrayFilter #JSLogic #LeetCode #WebDevelopment #LearnToCode #CodeEveryday #DeveloperJourney #Programming #TechCommunity JavaScript custom filter Implement filter without filter Truthy and falsy JavaScript JavaScript array filtering logic LeetCode JavaScript solution JS interview preparation Beginner JavaScript practice Daily coding challenge
JavaScript Filter Function Without Array.filter()
More Relevant Posts
-
Day 10/30 – JavaScript Once Function 🧠 | Ensure a Function Runs Only Once💻🚀 🧠 Problem: Given a function fn, return a new function that: Executes fn only once Returns the result on the first call Returns undefined on all subsequent calls ✨ This challenge helped me understand: Closures & state preservation Function wrappers How real-world features like one-time events, initialization logic, and API guards work This pattern is commonly used in: ⚡ Event listeners ⚡ Authentication flows ⚡ Performance optimization 💬 Where would you use a “run once” function? Comment below 👇 #JavaScript #30DaysOfJavaScript #CodingChallenge #Closures #JSLogic #LeetCode #WebDevelopment #LearnToCode #CodeEveryday #DeveloperJourney #Programming #TechCommunity JavaScript once function Call function only once JS JavaScript closures example Higher order functions JavaScript LeetCode JavaScript solution JS interview questions Beginner JavaScript practice Daily coding challenge
To view or add a comment, sign in
-
-
Day 9/30 – Count Function Arguments in JavaScript 📊 | argumentsLength Explained 🧠 Problem: Write a function argumentsLength that returns the number of arguments passed to it. ✨ This challenge highlights: How JavaScript handles function inputs The use of rest parameters (...args) Writing clean, flexible functions that work with any number of values Even small problems like this strengthen your understanding of JavaScript internals and interview basics. 💬 How would you handle this without rest parameters? Comment below 👇 #JavaScript #30DaysOfJavaScript #CodingChallenge #JSBasics #LeetCode #WebDevelopment #LearnToCode #CodeEveryday #DeveloperJourney #Programming #TechCommunity #LinkedInLearning JavaScript arguments length Count function arguments JS Rest parameters JavaScript JavaScript function basics LeetCode JavaScript solution JS interview questions Beginner JavaScript practice Daily coding challenge
To view or add a comment, sign in
-
-
Day 7/30 – Build Your Own Reduce Function in JavaScript 🧠 | No Array.reduce() 💻🚀 🧠 Problem: Implement a reducer function without using Array.reduce(). How it works: Start with an initial value init Apply fn sequentially on each array element Pass the previous result to the next iteration Return init if the array is empty ➡️ This is the foundation behind totals, accumulators, analytics, and state updates. ✨ What I learned: Accumulator patterns Sequential data processing How JavaScript handles functional-style logic internally Mastering reduce = next-level JavaScript thinking 💪 💬 Drop your solution or use-case examples in comments! #JavaScript #30DaysOfJavaScript #CodingChallenge #Reduce #JSLogic #LeetCode #WebDevelopment #LearnToCode #CodeEveryday #DeveloperJourney #Programming #TechCommunity JavaScript custom reduce Implement reduce without reduce Reducer function JavaScript JavaScript accumulator pattern LeetCode JavaScript solution JS interview questions Beginner JavaScript practice Functional programming JavaScript
To view or add a comment, sign in
-
-
Why var is Hoisted as Undefined in JavaScript 🤯 In JavaScript, var is hoisted and initialized as undefined. That’s why you can access it before declaration without an error. This short video explains: ✔ What hoisting is ✔ Why var behaves this way https://lnkd.in/gW3JxnUY Great concept for beginners and interview preparation. Complete Video URL https://lnkd.in/gQeg8qmH Website URL is https://lnkd.in/d-9Dtsn3 #JavaScript #WebDevelopment #FrontendDevelopment #Programming #SoftwareEngineering #InterviewPreparation #LearnToCode #JS
JavaScript Hoisting Explained: Why var is Undefined 😲
https://www.youtube.com/
To view or add a comment, sign in
-
🚨 JavaScript Logic Challenge What’s the Output? Think you’ve mastered core JavaScript? Let’s test your fundamentals 👇 Code: let x = "20"; let y = 5; console.log(x + y); 💬 What will be the output? (a) 25 (b) 205 (c) "100" (d) Error This looks simple… but it tests your understanding of: ✅ Type Coercion ✅ Data Types ✅ String vs Number operations ✅ The + operator behavior in JavaScript Many developers get this wrong because they forget how JavaScript handles implicit conversion. 👇 Drop your answer in the comments (a, b, c, or d) 🔥 Tag your coding buddy 📌 Save this post if you love JS challenges Let’s see who really understands JavaScript fundamentals. #JavaScript #WebDevelopment #FrontendDeveloper #CodingChallenge #LearnToCode #100DaysOfCode #JS #Programming #DeveloperCommunity #TechCareers #reels #explore #viral #coding #fyp
To view or add a comment, sign in
-
Binary Addition in JavaScript – Manual Approach 👉 Day 92 / Day 93 👈 40🔥 Binary addition manually in JavaScript instead of using built-in conversion methods. The idea is simple: Traverse both binary strings from right to left Add corresponding digits along with carry Maintain carry for the next iteration Build the result string from left #JavaScript #DataStructures #Algorithms #DSA #ProblemSolving #CodingPractice #FrontendDeveloper #InterviewPreparation #100DaysOfCode #Binary
To view or add a comment, sign in
-
-
🧠 Most JavaScript devs miss this subtle detail 👀 Especially those with 1–2 years of experience. No frameworks. No libraries. Just core JavaScript fundamentals. 🧩 Output-Based Question (Closures) function outer() { let x = 10; return function inner() { console.log(x); }; } const fn = outer(); x = 20; fn(); ❓ What will be printed? (Don’t run the code ❌) A. 10 B. 20 C. undefined D. Throws an error 👇 Drop your answer in the comments Why this matters This question tests: closures lexical scope how JavaScript remembers variables why reassignment doesn’t always change behavior When fundamentals aren’t clear: outputs feel confusing bugs feel random debugging turns into guesswork Good developers don’t just write code. They understand how JavaScript thinks. 💡 I’ll pin the explanation after a few answers. #JavaScript #WebDevelopment #Coding #Programming #Closures #JavaScriptFundamentals #DevCommunity #SoftwareEngineering #TechEducation #LearnToCode
To view or add a comment, sign in
-
-
🧠 Most JavaScript devs misunderstand this 👀 Especially those with 1–2 years of experience. No frameworks. No libraries. Just core JavaScript fundamentals. 🧩 Output-Based Question (this & bind) const user = { name: "Alex", getName() { return this.name; } }; const fn = user.getName; const boundFn = fn.bind(user); console.log(fn()); console.log(boundFn()); ❓ What will be printed? (Don’t run the code ❌) A. Alex Alex B. undefined Alex C. Alex undefined D. Throws an error 👇 Drop your answer in the comments Why this matters This question tests: how this works in JavaScript method vs function invocation implicit vs explicit binding why bind() exists When fundamentals aren’t clear: this feels unpredictable bugs appear “random” debugging gets painful Good developers don’t guess. They understand execution context. 💡 I’ll pin the explanation after a few answers. #JavaScript #WebDevelopment #CodingFundamentals #JavaScriptTips #DevCommunity #Programming #TechEducation #SoftwareDevelopment #JavaScriptForBeginners #UnderstandingThis
To view or add a comment, sign in
-
-
📌 JavaScript Array Methods — A Practical Reference JavaScript arrays are powerful, and knowing the right methods can make your code cleaner, more readable, and more efficient. This visual summarizes commonly used array methods, covering: Adding and removing elements (push, pop, shift, unshift) Transformations (map, filter, reduce, flatMap) Searching and checks (find, includes, indexOf, some, every) Array manipulation (slice, splice, sort, reverse) Iteration helpers (keys, values, entries) Why this matters: Encourages functional and expressive coding Reduces boilerplate loops Improves maintainability and readability Essential for frontend, backend, and data processing logic A handy reference for anyone working with JavaScript fundamentals or preparing for interviews and real-world projects. #JavaScript #WebDevelopment #FrontendDevelopment #Programming #DeveloperLearning #CodeQuality
To view or add a comment, sign in
-
-
Strengthening my JavaScript fundamentals one concept at a time! Today I revisited essential string functionalities in JavaScript — simple methods, but extremely powerful in real-world development. From transforming text to searching, slicing, and splitting strings, these functions are used almost everywhere in frontend applications. ✨ Quick reminder: Clean code starts with strong basics. Consistent practice with fundamentals like string manipulation helps write more efficient logic, optimize performance, and handle data better in real projects. What’s one JavaScript method you use almost daily? 👇 #JavaScript #WebDevelopment #FrontendDeveloper #CodingJourney #LearnToCode #Programming #ReactDeveloper
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
Your solution really shows how well you understand what's happening under the hood in JavaScript. Building these fundamentals from scratch definitely makes you a stronger problem solver overall.