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() ...Discuss·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...DiscussCodewars
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...DiscussbrowserCompatibility
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...Discuss·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...DiscussReact
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...Discuss·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...Discuss·89 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...DiscussJavaScript
Rojesh Shresthathenewbie.hashnode.dev·Jan 12, 2024Mastering JavaScript Array: Discussion on methods of arrayArray is a fundamental data structure used to store data of the same datatype under the same variable name. But JavaScript allows more flexibility compared to some other languages. Example of an array with different data types in JavaScript: const mi...DiscussflatMap
Rakesh Yadavblog.thinktor.com·Dec 28, 2023Reduce Function In JavascriptIn JavaScript, the reduce() function is a higher-order function that is used to reduce an array to a single value. It iterates over the elements of an array, applying a callback function to each element, and accumulating the result into a single valu...Discuss·30 readsJavaScript