Map, Filter, Reduce in JavaScript | The Complete JavaScript Course | Ep.43

preview_player
Показать описание

📖 Chapters
00:00 - Quick Recap
00:55 - Map Method in JavaScript
07:26 - How to use "index" inside forEach and map method?
12:58 - Filter Method in JavaScript
18:39 - Quick Assignment 1
19:51 - Quick Assignment 2
22:33 - How "Filter" Method Works? Chaining Array Methods!
37:49 - Reduce Method in JavaScript
01:01: 29 - Conclusion


Have any doubts? Join this Telegram group and ask your question. You can also share the projects that you make in this group.

Social Media

Music by geoffharvey from Pixabay
Рекомендации по теме
Комментарии
Автор

bhaiya cotnet next level ha bahut maza ata ha
SUGGESTION- BHAIYA BPLEASE THODA SA AUDIO QUALITY ACHA KAR DIJIYA

sumanshrana
Автор

19:51 ye rha assignment ka solution:

const filterMonths = months.filter(elem => {
for(let i=0; i<elem.length; i++){
if(elem[i] === 'm') {
return elem;
}
}
});
console.log(filterMonths);

OUTPUT:
[
"march",
"may",
"december"
]

21:40
const filterMonths = months.filter(elem => {
return elem.includes('m') || elem.includes('M');
});
console.log(filterMonths);

OUTPUT:
[
"March",
"May",
"December"
]

mdfurquanalam
Автор

Bhaiya Ji pehle baar mein hi crystal clear ho gaya. Hawa hawa mein nhi. Pen and paper leke practice kiya along with using ) bhi poore acche tareeke se clear ho gaya bhaiya. Bss ab kal subah wapas se poore video ko revise karunga badiyaan se!!!

adityasinghh
Автор

Best playlist 👍hope your channel cross millions of subscribers.

AishwaryaShinde
Автор

Well explained bro 🥰🥰 you deserve more subscribers 😍😍😍.


From pakistan🤩🤩🤩

MuhammadShamail-pexe
Автор

The telegram group link is not opening.

AliWaseemKhoso-zskf
Автор

18:49
const filteredMonths = months.filter((month, index) => {
console.log(index+1, month);
return month.length >= 5;
});
console.log(filteredMonths);

adityasinghh
Автор

sir awsome teaching sab samajaaya ek hi bar main thanks sir

stocfxd
Автор

it is very sad you dont have uploaded video of polyfill s of map reduve and filter mehod, what we expect it coming or not

dharmeshgohil
Автор

19 :00 //qn----aise name find kro jisme a include hai

const day= ["sunday", "monday", "tuesday", "wednesday"];
const chekdaylatter= day.filter((data)=>{
return data.includes("u");
})
console.log(chekdaylatter);

codinglife
Автор

0:00 sirka haatka mehendi utar gaya hai.( I dont know what that is but my best assumption is that's a mehendi.)

swagatpandak
Автор

Sir kasay pata chalaa gaa ka yehper foreach kaa use karnii haai our yehper map kaa.. please guide me❤

Muhammadshakir-tpcv
Автор

very well explained bro, Eagerly waiting for your React Js series.

mohmmadjesus
Автор

reduce ( id did it like this ):

const arr = ["cat", "dog", "rat", "mouse"];

const myNewArr = arr.reduce(
(accumulator, currentValue, currentIndex, array) => {
return accumulator + currentValue;
}
);

console.log(myNewArr); // output : - "catdogratmouse"

aashikroy
Автор

Hi sir. In forEach video u said by using map if u retun anything it will return as array but in this video u see even if u use return keyword in capitalMonths variabke y in console return values r not printinng. Pls clarify this

Mohammed
Автор

19:20
const months = ["January", "February", "march", "april", "may"];
const fMonths = months.filter((month)=>{
console.log(month);
return month.length >= 5

});
console.log(fMonths);

Asadalicoder
Автор

37:10
return student.startsWith('A');
bhaiya includes ke jagah yeh bhi chalega na yahan prr ???

adityasinghh
Автор

Assignment :

const students = [
{
name: "Anthony",
age: 23,
},
{
name: "Amar",
age: 23,
},
{
name: "Akbar",
age: 18,
},
];
const myNewArr = students.filter((element, index) => {
return element.age > 18;
});

console.log(myNewArr)

aashikroy
Автор

assignment :

const arr = ["cat", "dog", "rat", "mouse"];

const myNewArr = arr.filter((element, index) => {
if (!element.includes("t")) {
return true;
}
});

console.log(myNewArr);


Second Approach :

const arr = ["cat", "dog", "rat", "mouse"];

const myNewArr = arr.filter((element, index) => {
return !element.includes("t");
});

console.log(myNewArr);

aashikroy
Автор

sir mujhe smjh m toh aata he par bhul jata hu and sir andsir jo 19:51 pe assigment que. tha use me nhi kar paya 😣sir me nhi sikhg paunga kya

xpyqghg