Hi Aksahy, I am so grateful to you... You make my javascript concepts so clear that , I got offer from 5 companies and going to join a good company with 110% hike. I really believe your content is worth payable. Thank you so much 🙌🙌🙌🙌 Keep educating and spreading love and knowledge. 🥳🥳🥳
@@akshaymarch7 bro where are you . Please do continue this series. I think there is no one explains the things like you. Please don't stop making videos.
@@akshaymarch7 hello akshay, I don't know whether you are active or not but please consider our request and upload few more videos on topics like async await, promises, spread and rest operators I believe only you can cover these topics with greater depth of understanding hopefully you're seeing this comment and wish I'd see your smile in upcoming videos this is 22k already thanks for spreading that amount of knowledge on youtube you're one of the reason I tell my juniors that you can learn anything from yt javascript se pyar to krva diya lekin is pyar ko manjil tk to pahucha do.
Man your tutorials are so addictive, I don't want to study from other resources. You're like a good music band and we are fans that are waiting for new "songs". Please continue this awesome series 🙏🙏🙏
All Episodes of Namaste JavaScript Web Series: ru-vid.com/group/PLlasXeu85E9cQ32gLCvAvr9vNaUccPVNP ✅After watching this video, do let me know in the comment, How was the video? I read all the comments, would love your feedback! ❤️
@Akshay Saini Sir, Can you please make a video on a small project using all these concepts, with HTML CSS JavaScript, for beginners? So that we know where and how these concepts of your previous videos are used. I know that we can google the project, but your explanation is the best and we can understand all the concepts clearly. Only if it is possible and if it doesn't bother you to show a small project. Thankyou Sir. Please consider😊
Hi Akshay, I just finished your "Namaste JavaScript - series 1" course. I can't say how much confident I am in JavaScript now just because of you. Thank you so much for making this amazing video series on JavaScript. Homework solution: const users = [ { firstName: "Akshay", lastName: "Saini", age: 26 }, { firstName: "Donald", lastName: "Trump", age: 75}, { firstName: "Elon", lastName: "Must", age: 50}, { firstName: "Deepika", lastName: "Padukone", age: 28} ]; const output = users.reduce(function(acc, curr) { if (curr.age < 30) { acc.push(curr.firstName); } return acc; } , [ ] ); console.log(output); P.S - from today onwards, I am naming you "The Amazing - Akshay Saini" Regards, Your Well-wisher and a learner
My answer to homework: const userList = users.reduce((acc, curr) => { if(curr.age < 30) { acc.push(curr.firstName); } return acc; },[]); console.log(userList); This was asked in an interview. Thanks for explaining and letting us know :)
I'm a Nigerian who has been struggling to understand these concepts with some of my friends. I love how you add jokes and giffs while teaching. You just earned 12 subscribers(I and my 11 friends)
Things learned: 1. map method is used when we want transformation of whole array. 2. filter is used when we want to filter the arrar to obtain required value. 3. reduce is used when we want to reduce the array to single value eg (max, min, avg, sum, difference etc). 4. reduce passes two arguments one function(which includes accumulator and initial value as argument itself) and another initial value of accumulator. 5. Homework: const output = user.reduce(function(acc, curr){ if (curr.age < 30){ acc.push(curr.firstName); } return acc; }, [ ]) console.log(output);
@@lakshyapant5225 Kyuki accumulator(acc) ki pehli condition me hi aapne return kar diya. Vo function se exit ho jaayega, aage ka process ruk gaya pura.
const output = users.reduce((acc, curr) => { if (curr.age < 30) acc.push(curr.firstName); return acc; }, []); console.log(output); Brind polyfill of map, filter and reduce. this is one of the best video😍
dude, you are a legend. I never saw anyone who explain a program the way you do. not just telling if you do this, this will happen, instead showing how it is happening. If you could upload the same way of teaching for other programs as well, it would be really amazing. I wouldn't mind to pay for such an golden content. also your smile really makes this course very enjoyable to watch. thankyou again
Hi, @@debo01 No, this will not work because you initialized the reduce function with object literals {}. Since we are pushing (.push) the results we should use an array for initialization, just like @Mohammad Noushad Siddiqui did. Thanks.
I freaking love your videos man.. u have no idea how much I'm hanging on to life because of u... you're not like the teacher who presents boring slides & reading from scripts, u speak from the heart. I just love yr energy & enthusiasm.. u give me light at the end of the tunnel..
@@jahangagan5396 I like your answer jahan that is what I came up with. I don't really understand Omkar answer of acc = [...acc, curr.firstName]; why are we using spread syntax here
@jahan gagan Write a PURE function using map,filter and reduce methods to calculate the income tax given an amount. 0 upto 2.5L, 5% for 2.5L-5L, 20% for 5L-10L, 30% for more than 10L. Can you help me with this please
// Code for the challenge given at 36:05 const outputlist = users.reduce((names, user) => { if(user.age < 30){ names.push(user.firstname); //can also use names.unlist(user.firstname); } return names; }, []);
Thanks for explaining the javascript in so detail H.W const output = users.reduce((acc,curr) =>{if(curr.age < 30){acc.push(curr.firstname);} return acc},[]) console.log(output);
Please continue this series sir ,as we want to learn more about things like promises , async-await , fetch api , OOPS in javascript and more on functional programming.
11:49 Found the answer for why reduce is named so. According to an article on digital ocean - "A reducer will only return one value and one value only hence the name reduce." In simple terms, it reduces the array to a single value.
I was learning reduce from the video by coding myself and when I tried without assigning an initial value to the acc argument, the first element in the array was assigned to it automatically and the second element was assigned to the curr argument, just sharing an interesting fact, you are a great teacher ❤️❤️
const names = users .reduce(function (acc, curr) { if (curr.age < 30) { acc.push(curr); } return acc; }, []) .map((x) => x.firstname); console.log(names); This is the homework.. Thank you sooo much. You explained the concepts very well.
Hi akshay. Today I have completed this season second time. I feel very confident in js fundamentals. while watching first time i cannot able to solve some the problem. Now I can able to solve. Thank you so much Akshay!! by using reduce const output = users.reduce(function(acc, curr){ if(curr.age
Akshay Sir, it's commendable that you are sharing the knowledge with everyone. You are an inspiration for all of us. Btw I did the homework. let data = users.reduce((acc,personDetails)=>{ if(personDetails.age < 30) acc.push(personDetails.name); return acc; },[]);
const output1 = users.reduce((acc, curr) => { if (curr.age < 30) { acc.push(curr.firstName); } return acc; }, []); console.log(output1); Thanks a lot!!!!!! Really i was always frustrated with reduce cause i could not understand completely and found it hard. you just made it so easy n i solved all the extra problems before watching your solution. I just love the way you teach and make it so simple that anyone could understand
Hello Akshay Saini sir, I'm Jaymin Darji from Gandhinagar, Gujarat. First of all thank you very much for this Namaste Javascript series. I have learned lot's of new things from this series. I'm BCA graduage and currently doing MCA. I already know the javascript concepts but you have made my javascript knowledge top lavel. I can't stop myself to watch next video. One interesting thing I want to tell you, I just started this series at 20/7/2024 and today 24/7/2024 (Done with the whole searies) . Once again, Thank you very much 🙏🙏
11:50 - Name reduce was assigned with a purpose to maintain similarity between languages. We have similar reduce (and map, filter as well) in other languages also - Java, Python, Scala, Ruby etc. So having a consistent naming convention will be very easy for developers to get up and running when they switch from one language to another!
Hey Akshay 😍 I landed a fully front end position at Adobe. You are a gem Your tutorials were like a one place stop. I didn’t refer to any other documentation or tutorial. Made my life easy. Thank you so much ❤️❤️ This community is awesome because of people like you 🔥
first of all a very congratulations Akshaya ma'am , it will be a very kind of you if you may tell from where did u referred rest of the topics of this series , from where Akshay saini sir left this series ????
@@Abhishek_Poddar Could you tell me what you mean by rest of the topics? Interviews mostly cover the fundamentals. There were no targetted question based on syntax so in my view I think if you complete this playlist you can answer most interview questions on JS.
Hats off to you Akshay for the Content. const output = users.reduce((acc, curr) => { if (curr.age < 30) { acc.push(curr.firstName) } return acc }, []);
I regret for not finding your channel earlier :( still neva too late :) . So much clarity and that eager to make viewers understand the topic. Hats off. Thanks a lot.
I know I'm already late for this but I have finally completed this JS tutorial today. It's just amazing and I don't have any words to describe and YES along with falling in love with JS, I fell in love with Akshay too 😊
I am in more love with Javascript after watching "Namaste Javascript". I have shared it with all of friends and colleagues to strengthen their knowledge about JS. Words are not enough to explain the value of this series. Thanks for making this series for everyone with pure love and dedication ❤
// homework : find firstName of all the uers whose age is less than 30 using reduce() const output = users.reduce(function(acc, curr){ if(curr.age < 30){ acc.push(curr.firstName); } return acc; }, []); console.log(output); Thank you for this beautiful video❣
No Words for this content just Asowme , Today I got clarity about map(), filter(), reduce() # Take Inputs = arr const res = arr.reduce((acc, curr) => { if (curr.age > 20) { acc.push(curr.name) } return acc }, []) console.log(res)
Thankyou for the lesson, here is my homework 😸 const output = users.reduce(function(acc, curr){ if(curr.age < 30){ acc = [...acc, curr.firstname] } return acc },[])
We can do something like this to get the desired output! const filterByAge = users.reduce((acc,item)=>{ if(item.age>30){ acc.push(item.firstName); } return acc },[])
Hi Akshay, first of all Thankyou so much for clearing my doubts in array reduce. It was so simple and easy to understand. You definitely made me fall in love with Javascript. The Namaste Dev courses are so worth paying and I learnt a lot. Please do more videos and courses by educating us.
in example 8 using initial value as arr[0] is better because it works for negative values as well and ~~ akshay saini is one of the best guru/teacher with amazing teaching skill ~~ :::::::::::: const arr = [-1,-5,-7,-2,-6,-9,-11] const output = arr.reduce((acc, curr)=>{ if(curr > acc){ acc = curr; } return acc; }, arr[0] ) console.log(output);
Greate and in-depth teaching i ever seen.even you start it with very basic knowledge, you will get know what JavaScript is actually. Due to other programming languages knowledge many time confusion get created, but this course played very well to teach without any confusion.. Thanks to you Akshay, this helped a lot.
This should work. You don't need 2 return statements. let output = users.reduce((acc,curr) => { if(curr.age < 30) { acc.push(curr.firstName); } return acc; },[]);
Thank you for such a nice content. Really clarified all my doubts with simple and advance examples. Home work completed sir. :) const output = users.reduce((acc, curr) => { if (curr.age < 30) { acc.push(curr.firstName); } return acc; }, []); console.log(output); @Akshay Saini, Can we expect videos on `Iterators` and `generators` in JS in near future ?
let results = names.reduce((acc,curr)=> { if(curr.age < 30) { acc.push(curr.firstname); } return acc; },[]) console.log(results); enjoyed watching your video. Thank you for creating such a nice video for us.
Hi Akshay, As you asked about writing a program using reduce, Here it is :- const output = users.reduce(function (acc, curr){ if (curr.age < 30){ acc.push(curr.firstName); } return acc; }, []) console.log(output);
Akshay Bhaiya , Please start a small course or a bootcamp for JS from basic concepts to advanced , this content is gold , we need more of your explanation in various concepts and functional concepts. #JSbyAkshaySaini
This works... const reducedArray = users.reduce(function (acc, curr) { if (curr.age < 30) { acc.push(curr.first) } return acc }, []) Thanks Akshay for this series! You are a gem
Hi , thanks for clarity on such concepts const res = users.reduce((acc, curr) => { if (curr.age < 30) { acc.push(curr.name); } return acc; }, []); console.log(res);
when will you release a video on the 'This' keyword in JS. We really need to understand how the binding of "this" is different in the arrow function !! BTW, great work till now!
Here is my solution: const output = users.reduce(function(acc, curr){ if(curr.age < 30){ acc.push(curr.firstName); //if age of current user is < 30, push there firstName into the acc array } return acc; }, [ ]); //initially, the acc will be an empty array console.log(output); Thanks Akshay for such a crystal clear explanation!!
I am addicted to the way you teach and changed the way, I used to learn. Now, I always hunt the blogs which go in-depth. Here is my H/W // find people whose age is less than 30 using reduce const users = [ {firstName: "Inderpreet", lastname:"singh", age:31}, {firstName: "Rahul", lastname:"Kumar", age:28}, {firstName: "Akshay", lastname:"Saini", age:20} ]; const output = users.reduce(function(acc, curr) { if(curr.age
Took a deep breath and did this, const output = users.reduce((acc, curr) => { if (curr.age > 30) { acc.push(curr.firstName); } return acc; }, []); console.log(output);
Hi Aksahy, I am so grateful to you... You make my javascript concepts so clear that , I got offer from 5 companies and going to join a good company with 110% hike.
Thank you Aksahy Bhai, I wasn't able to understand map, filter and reduce method even after watchind different YT tutorials, but your way of explaining from the fundamentals is great
Thankyou for this valuable content... I cannot thank you enough for the time, effort, and dedication you pour into creating such valuable content.Your ability to explain complex concepts in a clear and engaging manner has made learning from your videos not only educational but also immensely enjoyable. Thankyou akshay sir 🙏🙏🙏
This video was crazy. TYSM ❤ here is the homework with reduce const ageoutput = users.reduce(function(acc, curr){ if (curr.age < 30){ acc.push(curr.firstName); } return acc; }, [])
Hi Akshay Sir Thank you for sharing your knowledge I was so confused about the concepts and pull my hairs like how the things done but with your way of teaching and your support make me fall in love with the javascript and now I understand the concepts way better than before . Thank you Thank you Thank you Thank you Thank you Thank you a big Thank you for sharing your knowledge with us.
In summary: - `map` is for transforming elements, - `filter` is for selecting elements based on conditions, - `reduce` is for aggregating elements into a single value.