Web Developer
8.49K subscribers
135 photos
3 videos
10 files
33 links
Books
YT Channels
Articles
Courses
Notes

👥 Group : @Web_developersz
Download Telegram
Topic : What is Map in JavaScript ?

"new Map()" - is a built-in object in JavaScript that represents a collection of key-value pairs. It was introduced in ECMAScript 6 and is similar to an object, but with some important differences.

One of the main differences between a Map object and a regular JavaScript object is that the keys in a Map object can be any type of value, including objects and functions, while the keys in an object must be strings or symbols.

(👥) • @Web_developersz
(📚)
@Web_developerszz

#Map #JavaScript
Javascript Reduce method Example.

▫️ Finding the longest word in a given string.

function longerWord(a, b) {
if (a.length > b.length) {
return a;
} else {
return b;
}
}

const sentence = 'Hey there what are you doing this Wednesday night';

const longest = sentence.split(' ').reduce(longerWord);

console.log(longest);

// Wednesday

#JavaScript #Reduce

(👥) • @Web_developersz
(📚) • @Web_developerszz
Quiz Time - Immediately Invoked Function Expression.

💬 Comment your answer!!!

#JavaScript #IIFE #Quiz

(👥) • @Web_developersz
(📚) • @Web_developerszz