Apr 9, 2024 · 2 min read · what 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...
Join discussion
Nov 29, 2023 · 6 min read · Note: Try to code by yourself and understand the output Introduction In computer programming, a loop is a sequence of instructions that repeats until a specific condition is met. Loops are a fundamental and powerful programming concept. There a...
Join discussion
Apr 13, 2023 · 5 min read · In JavaScript, Map is a built-in object that provides an easy way to store and manipulate data in key/value pairs. Map vs. Object The main difference between a Map and an Object in JavaScript is the type of their keys, as well as how they store and m...
Join discussion