Hossein MarganiforHossein Margani's Blogmargani.dev·Jan 13, 2025Using reduce in JavaScriptThe reduce function is a powerful tool for processing arrays in JavaScript and TypeScript. It allows you to iterate over an array and accumulate a single value from the elements. Let's explore how it works with some examples. const numbers = [1, 2, 3...JavaScript
Blossomblossom.hashnode.dev·Dec 20, 2024Callbacks in Javascript: How and Why it Powers FunctionsIn JavaScript, callbacks are the unsung heroes we use absentmindedly in many of our functions and methods. They enable flexibility, reusability, and asynchronous programming. Understanding callbacks is crucial - not just how to implement them but how...Js Bits and piecesJavaScript
Lokesh Goswamilokeshgoswami.hashnode.dev·Jul 13, 2024Understanding map, filter, and reduce MethodsHey there, fellow JavaScript enthusiast! Today, we’re diving into three incredibly powerful array methods: map, filter, and reduce. These methods can help you write cleaner, more efficient code. Let’s break them down together! 1. Understanding map() ...10 likesNode.js
Filip Melkafilipmelka.hashnode.dev·Jul 11, 2024Solving a Code Wars Challenge with the Reduce Method and a Bitwise OperatorWhile solving problems on Code Wars, I came across an interesting problem called Find the Odd Int. It seemed simple at first, but one particular solution fascinated me so much that I decided to write about it. The problem Here's what the problem asks...Codewars
AARYAN BAJAJaaryan-bajaj-learnings.hashnode.dev·May 25, 2024Polyfills for Map , Filter & Reduce in JavascriptIntroduction Ever found yourself working on a project only to realise your JavaScript methods aren’t supported in older browsers? 🤔 Let's talk about how polyfills can be your rescue squad! In this blog, we'll explore What polyfills are Why the...browserCompatibility
Abhishek Dandriyalabhishek-dandriyal.hashnode.dev·Apr 9, 2024Map, filter and reducewhat is map() ? A higher-order function in programming is used to transform each element in an array according to a given function. const nums = [1,2,3,4]; const multiplyThree = nums.map((num,i,arr)=> { return num * 3; }) console.log(multiplyThr...1 likemap-filter-reduce
SHAURYA ROYsharpyshaurya.hashnode.dev·Mar 10, 2024Difference Between Reduce(), Map() and Filter()Have you ever found yourself tangled in the web of map(), filter(), and reduce() in JavaScript? Don't worry; you're not alone. These three array methods are powerful tools for manipulating data, but understanding when and how to use them can be a bit...React
Kuruva Vinayoden.hashnode.dev·Mar 2, 2024JavaScriptEverything in JavaScript is done in Execution context which consist of memory component(Environment variables) and the code component. The separate Execution context is create for each function usage. After completing of running code the data will be...30 readsJavaScript
Keerthivardhankeerthivardhan.hashnode.dev·Feb 12, 2024JavaScript Before React (Part-1)I firmly believe that this will be the final article you'll need to read on this topic. These topics are essential prerequisites before delving into React. Once you've absorbed and practiced the content here, your comprehension of React will undoubte...91 readsjavascript Essential
Tushar Khannacodertushar.hashnode.dev·Feb 12, 2024Learn Polyfill of JS Reduce with ChatGPT// callback -> previousValue, currentValue, index, array function myReduce(callback, initialValue) { const array = this if(!array) throw new Error("Array is not defined") const arrayLength = this.length let index = 0 if(!arrayLen...JavaScript