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

Поділитися
Вставка
  • Опубліковано 9 лют 2025

КОМЕНТАРІ • 85

  • @adityasinghh04
    @adityasinghh04 10 місяців тому +7

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

    • @procodrr
      @procodrr  10 місяців тому +1

      Bahot sahi, aise hi padhte raho 👍

    • @adityasinghh04
      @adityasinghh04 10 місяців тому +1

      @@procodrr Bilkul bhaiya🙏🏻

  • @mdfurquanalam786
    @mdfurquanalam786 11 місяців тому +2

    19:51 ye rha assignment ka solution:
    const filterMonths = months.filter(elem => {
    for(let i=0; i {
    return elem.includes('m') || elem.includes('M');
    });
    console.log(filterMonths);
    OUTPUT:
    [
    "March",
    "May",
    "December"
    ]

    • @AftabReshamwale
      @AftabReshamwale 10 місяців тому

      my method - const filteredMonths = () =>
      months.filter((month) => month.toLowerCase().includes("m"));
      console.log(filteredMonths());

    • @trainerdevesh
      @trainerdevesh 6 місяців тому

      Try to reduce your code it's too lengthy

    • @mdfurquanalam786
      @mdfurquanalam786 6 місяців тому

      @@trainerdevesh see carefully there are 2 code and of only 4 lines

    • @trainerdevesh
      @trainerdevesh 6 місяців тому

      @@mdfurquanalam786 sorry' bruh I reply on wrong comments

    • @muhammadishaque4818
      @muhammadishaque4818 Місяць тому

      your first solution is wrong, it returns an empty array,

  • @Pushpak_UE_devlover
    @Pushpak_UE_devlover 16 днів тому +2

    ager ye itana he thaa to mujhe 1 he baar may samj gaya bcz of ur explaination
    tip : jisko nahi samjha ho vo 3-5 q practice karo yaa fir 1 baar dhyan say deko fir aur practice kar te vakt observ karo samj aa jayega
    I started this playlist This is day 5 I know basics of javascript so I will binge watch basic part and if I found any topic which I don't know then I will try that topic

  • @AishwaryaShinde18
    @AishwaryaShinde18 Рік тому +8

    Best playlist 👍hope your channel cross millions of subscribers.

    • @procodrr
      @procodrr  Рік тому +3

      Thanks Aishwarya, keep learning and sharing 😊

  • @Collecting_one_piece_fan
    @Collecting_one_piece_fan 4 місяці тому +2

    Day 19: video 43 completed ....thank you sir making such great Video 😊....
    24 video left for first project... excitement is on the peak 🎉🎉

    • @procodrr
      @procodrr  4 місяці тому

      Awesome, keep learning and growing 😊

  • @MuhammadShamail-pe2xe
    @MuhammadShamail-pe2xe 8 місяців тому +4

    Well explained bro 🥰🥰 you deserve more subscribers 😍😍😍.
    From pakistan🤩🤩🤩

    • @shyamkumar-rs9mx
      @shyamkumar-rs9mx 7 місяців тому

      kaafiron se mat seekho alla taala naaraaj ho jayega . shirk hai ye

  • @adityasinghh04
    @adityasinghh04 10 місяців тому +2

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

  • @h4s4n_ma
    @h4s4n_ma 29 днів тому

    18:59 ===>>>>>>>>>
    const filteredMonths = months.filter((month, index)=>{
    return month.length >= 5
    })
    console.log(filteredMonths); => [
    "january",
    "february",
    "march",
    "april"
    ]

  • @rajendradalavi-x1k
    @rajendradalavi-x1k Рік тому +3

    sir awsome teaching sab samajaaya ek hi bar main thanks sir

    • @procodrr
      @procodrr  Рік тому +2

      Awesome, keep learning and sharing 😊

  • @arfatshaikh4669
    @arfatshaikh4669 5 місяців тому

    Pure youtube pe aapke jaisa koi hai hi nahi sir❤ mast

  • @chetandewalkar4542
    @chetandewalkar4542 10 місяців тому +1

    Thank you sir, U are great teacher🙏

  • @sagarkushwaha7990
    @sagarkushwaha7990 4 місяці тому +4

    1:00:47, 24 panche= pata nahi. 😂. But thank you bhaiya ❤❤

  • @vinaypatil8009
    @vinaypatil8009 2 роки тому +4

    Sir Great Lecture 😊

  • @s.siddiqui933
    @s.siddiqui933 8 місяців тому +2

    good explained sir😍

  • @mohmmadjesus6710
    @mohmmadjesus6710 2 роки тому +3

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

    • @procodrr
      @procodrr  2 роки тому +3

      Thanks Bro 😊,
      React series will come by mid February.

  • @SALUJAPAITAL
    @SALUJAPAITAL 6 місяців тому

    sir osm wow 😍😍😍😍😍

  • @sakshampethkar01
    @sakshampethkar01 2 роки тому +2

    Explained really well..💯

  • @sumanshrana1663
    @sumanshrana1663 6 місяців тому +1

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

  • @Asadalicoder
    @Asadalicoder 7 місяців тому

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

    });
    console.log(fMonths);

  • @codinglife91
    @codinglife91 8 місяців тому +1

    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);

    • @BeaLearner-b9p
      @BeaLearner-b9p 8 місяців тому

      but return data.includes me u q likha hai jb find a wale krne hn

    • @codinglife91
      @codinglife91 8 місяців тому

      @@BeaLearner-b9pmistake brother aap u ke place pr a likh skte hai

  • @chetanupadhyay8409
    @chetanupadhyay8409 9 місяців тому

    Very well Explained

  • @SAHUJi_08
    @SAHUJi_08 6 місяців тому

    After two months I'm watching the reduce method again for making a project

  • @AliWaseemKhoso-zs1kf
    @AliWaseemKhoso-zs1kf 8 місяців тому +1

    The telegram group link is not opening.

  • @Mohammed78614
    @Mohammed78614 7 місяців тому +1

    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

    • @procodrr
      @procodrr  7 місяців тому +1

      If you are running your code using VS Code and Live Server then return values will not be printed until you explicitly print them using console.log(). However if you directly run the same code in the browser's console all the return value will be printed automatically. This is how JavaScript works.

  • @brijendrayadav2675
    @brijendrayadav2675 6 місяців тому

    At 21:44
    for lower case ....
    toLowerCase()
    or
    toLocaleLowerCase()
    Which is right ?

  • @trainerdevesh
    @trainerdevesh 6 місяців тому +1

    const month = [jan--may]
    const filteredMonth = month.filter((month=>{
    console.log(month)
    return month.includes( 'M' || 'm')
    })
    Output : March and may

    • @Jha_adarsh
      @Jha_adarsh 6 місяців тому

      Hi @trainerdevesh, did you ran it on console ?

    • @trainerdevesh
      @trainerdevesh 6 місяців тому

      @@Jha_adarsh yes it's ran correctly

    • @trainerdevesh
      @trainerdevesh 6 місяців тому

      @@Jha_adarsh actually there is bugs in this comment but my logic is right

    • @Jha_adarsh
      @Jha_adarsh 6 місяців тому

      @@trainerdevesh cool

  • @NirbhayMarde-qz1kj
    @NirbhayMarde-qz1kj 7 місяців тому +1

    Lecture 43 Completed.

  • @adityasinghh04
    @adityasinghh04 10 місяців тому +2

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

    • @procodrr
      @procodrr  10 місяців тому +1

      Haa, ye kewal starting wale characters ko check karega.

    • @adityasinghh04
      @adityasinghh04 10 місяців тому +1

      @@procodrr ji bhaiya

  • @dharmeshgohil9375
    @dharmeshgohil9375 10 місяців тому +1

    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

  • @Nadim166
    @Nadim166 Місяць тому

    Sir i didnt find reduce method interesting w me can add all the element by using simple loop .i think it was complicated guys how did u find this method?is it good?

  • @aashikroy2198
    @aashikroy2198 7 місяців тому

    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);

  • @Muhammadshakir-tp2cv
    @Muhammadshakir-tp2cv 6 місяців тому

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

  • @MandeepSingh-qq2ed
    @MandeepSingh-qq2ed 8 днів тому

    i have a doubt ki hum toh issme if and else if ka bhi toh use kr sakte the na?? toh filter hi kyun kra?????

  • @aashikroy2198
    @aashikroy2198 7 місяців тому

    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)

  • @samayrainaofficiaI
    @samayrainaofficiaI 10 місяців тому +1

    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

    • @AftabReshamwale
      @AftabReshamwale 10 місяців тому +2

      bhai tension mat lo first time main hota hai aisa but practice karne se sab samajh aa jayega dont worry keep just keep practicing .

  • @swagatpandak7325
    @swagatpandak7325 8 місяців тому +1

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

  • @manishrai1314
    @manishrai1314 2 місяці тому +1

    Kya samjhana chahte ho wahi ek loop ban jata hai 😂

  • @subham_mahakud
    @subham_mahakud Місяць тому

    can we set month.includes('m' || 'M')

  • @rutikjadhav771
    @rutikjadhav771 13 днів тому

  • @subhamdarjee5215
    @subhamdarjee5215 3 місяці тому

    present sir

  • @somnathruidas648
    @somnathruidas648 5 місяців тому

    Sir maine thoda jayda hi kar liya pehle map use karke lowercase kiya then filter mein include use kiya 😂😂

  • @Anshsingh-h7m
    @Anshsingh-h7m 5 місяців тому

    sir app padate to hai but ye kya hai use kya hai kiska part hai ye nhi batate hai jo or dusre log bahut ache se explain krte hai app bhi agr batate to sayad content bahut acha rhta

  • @केशव108
    @केशव108 11 місяців тому

    aap nhi hote toh hum na hote mst smjhaya baaki sb toh bss angrji k tote bne bethe hai hindi jindabad

    • @sjshdhehbesjks
      @sjshdhehbesjks 10 місяців тому

      sahi me bhai har koi cool banne me laga hai ajkal par padha koi nahi raha anuragh bhai badiya hindi me samjhata hai

  • @anishkumar.2135
    @anishkumar.2135 6 місяців тому

    Day5

  • @CodesolveNetwork
    @CodesolveNetwork 10 місяців тому

    reduce smj hi nhi aaya bhaiya

  • @manishrai1314
    @manishrai1314 2 місяці тому +1

    Sach bolun to lecture acha hai hrr topic touch karte ho aap,pr samjh m nahi ata kyoki aap khud confusion m rahte ho pata nahi kya samjhana chahte ho

    • @Harsh-qv4xc
      @Harsh-qv4xc 2 місяці тому

      Bro or koi baat nhi sir per Rohit Sharma ka aser hai kuch but kuch kaho sir achha padhatay hai😊

  • @aashikroy2198
    @aashikroy2198 7 місяців тому

    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"

  • @webarrays
    @webarrays 7 місяців тому

    reduce explain ap ny achy sy kiya lakin confusing tha bht sahi sy teach nahi ker paye

  • @kparteearabhi3322
    @kparteearabhi3322 9 місяців тому

    day10

  • @mrnabby4178
    @mrnabby4178 3 місяці тому

    Main pagal o ki terah 2 conditions likh raha tha months mein jiske andar m ho.😂😂
    const filteredMonthsContainsM = months.filter(
    (month) => month.includes("M") || month.includes("m")
    );
    console.log("filteredMonthsContainsM", filteredMonthsContainsM);

  • @Shafiq-uw6vz
    @Shafiq-uw6vz 4 місяці тому

    const months = [ 'January','february','march','april','may' ]
    const capital=months.filter((month) =>{
    // console.log();
    return month.length >= 5
    } )

  • @AdityaRaj-ix3mn
    @AdityaRaj-ix3mn 10 днів тому

    month = ["jan", "March", "Karna", "tanu", "amnu"]
    const filteredMonths = month.filter((month)=>{
    for (let i= 0; i{
    return month.toLowerCase().includes('m')
    })
    console.log(result)

  • @varshasingh6675
    @varshasingh6675 3 місяці тому

    const filtermethod = months.filter((month,index) => {
    // console.log(month);
    return month.match('m');
    })

  • @agney_2002
    @agney_2002 2 місяці тому

    const newVariable1 = fruits.filter((fruit) => {
    console.log(fruit.includes("M") || fruit.includes("P"));
    return (fruit.includes("M") || fruit.includes("P") ) && fruit.length > 4;
    }
    )
    console.log(newVariable1);