Higher Order Functions - JavaScript Tutorial

Sdílet
Vložit
  • čas přidán 28. 06. 2024
  • What is a Higher Order Function in JavaScript?
    Why do we need Higher Order functions?
    And how can you use them to your advantage?
    Higher Order Functions from the series "10 Things JS Developers Should Know"
    by ColorCode.io, Sina Jazayeri
    Full playlist here: • 20 Things JavaScript D...
    This is episode 8 in a 10 part series I’m calling 10 things javascript developers should know but probably don’t. In this series, we’re going to cover some of the most fundamental and important parts of JavaScript that most of us don’t actually know, and barely touch. Today, for episode 8, we’re talking about Higher Order Functions, why they exist, and how to use them. Episode 8: Higher Order Functions. Let’s go!
    All the code from this series is available here:
    github.com/ColorCode/js-10-th...
    0:00:00 Intro
    0:01:11 What is a Higher Order Functions?
    0:02:28 Example: setTimeout
    0:03:33 Example: Array.filter
    0:04:50 Example: Iterators and Loops
    0:06:09 Chaining functions together
    0:07:29 Function Factory
    0:08:54 Conclusion

Komentáře • 246

  • @ColorCodeio
    @ColorCodeio  Před 2 lety +24

    Episode 8: Higher Order Functions - JavaScript Tutorial 💻🎉

    • @simplesolutions289
      @simplesolutions289 Před 2 lety

      what IDE do you use for these videos?

    • @ColorCodeio
      @ColorCodeio  Před 2 lety

      @@simplesolutions289 Chrome DevTools

    • @caribbeanman3379
      @caribbeanman3379 Před 2 lety

      4:45 BTW, I remember seeing on a JavaScript video that it's bad practice to use array notation to get a particular character from a string like you've done here with "n[0]". I don't remember the details of why it's bad. But it was suggested that it's better to use one of the string functions like n.slice(0,1) or n.charAt(0).

  • @catbros4life
    @catbros4life Před 2 lety +54

    I don't understand why you don't have a lot more subscribers. I have went through several videos and found them very useful .

  • @camcairns2584
    @camcairns2584 Před rokem +38

    Sina, just a note of appreciation - your content and presentation are immaculate. You are one of the few educators who can employ humor so it contributes rather than detracts.

  • @Yawnz2
    @Yawnz2 Před 2 lety +20

    Currently 8 weeks into a web development bootcamp and i'm extremely lost....your videos are really helping me out man thank you!

  • @aleclloydprobert6897
    @aleclloydprobert6897 Před 2 lety +22

    This series is very well done, and extremely clear and useful. Can't wait for the episode on closures.

  • @sbvforworld4290
    @sbvforworld4290 Před 9 dny

    Would love to have more and regular videos from you. Because The Channel is A CLASSIC .

  • @viorelmnk
    @viorelmnk Před 2 lety +2

    i like the way you explain in detail and with examples and the way the videos are made, very modern, clean and each topic of the videos gets a "separate" part of the video, making it easy for us viewers.

  • @SofiaLo-23
    @SofiaLo-23 Před rokem +1

    This is the first video I watch from your channel and I have to say it is really good. The animations, explanation and everything. Thank you so much

  • @MohyDev
    @MohyDev Před 2 lety +1

    Loving this series, PLEASE DO MORE!

  • @lloydchan9606
    @lloydchan9606 Před 2 lety +4

    these edits are so clean and entertaining, i wish more people saw you

  • @otabekkadirov2578
    @otabekkadirov2578 Před rokem +5

    This is a great explanation, thank you Sina. You are doing a great job, so please don't stop.

  • @riteeshpai2369
    @riteeshpai2369 Před 2 lety +1

    I wasnt knowing for months like what it is to use this keyword with arrow functions.I legit didnt understand it.But now seeing your explaination made it all clear to me.You are a gem.

  • @elielberra2867
    @elielberra2867 Před 5 měsíci

    All your videos are incredible useful, and super easy to understand! Thank you so much :)

  • @SahilPatel-zn3lo
    @SahilPatel-zn3lo Před rokem +1

    I really love the way you connect current concepts to previously taught concepts and many different ways to do the same thing. really man hatf off to you and well yeah merry christmas to you

  • @speedhaak
    @speedhaak Před 2 lety +1

    Appreciate the bite sized approach to this content. Sometimes when you are researching something and you're staring down the barrel of a 45 minute video it can be defeating.
    Cheers :)

  • @kemekenneth
    @kemekenneth Před rokem +1

    Love the animations/transitions

  • @Jok3rundead
    @Jok3rundead Před rokem

    Love your videos man! You explain things very clearly and concisely while also keeping it fun at times with your jokes. Brilliant channel please keep it going until the end of time :)

    • @ColorCodeio
      @ColorCodeio  Před rokem

      Thanks! No plans to stop any time soon :)

  • @paulsisson8944
    @paulsisson8944 Před rokem +1

    Great work brother! Keep it up. Us newbs really appreciate this stuff, especially when it isn't ultra-dry/tedious like a lot of these videos tend to get.

  • @karimmaged5024
    @karimmaged5024 Před rokem +4

    Not sure if you'll see this, it's a year old video.
    I'm currently learning web development and your videos are one of the greatest resources I found.
    You deliver the info in a light yet effective way.
    Hopefully you won't give up on this channel and would continue publishing those awsome videos.

    • @ColorCodeio
      @ColorCodeio  Před rokem

      Of course I see your comment :) I have no plans to stop posting videos. Thank you for taking the time to write.

  • @kylemyers5802
    @kylemyers5802 Před rokem +1

    This was extremely helpful, the examples were awesome and the way you explained them made them all click for me. Thanks!

  • @dennisa6449
    @dennisa6449 Před 2 lety +1

    Crazy good quality! Keep it up mate

  • @mackenkie
    @mackenkie Před rokem +1

    great production quality and explanation! Made it easier to grasp.

  • @nemanjakaran8799
    @nemanjakaran8799 Před 2 lety +1

    Very concise, and very well explained - good job and thanks!

  • @georgetuccio6053
    @georgetuccio6053 Před rokem +1

    Really enjoying the 10 part series. Just finished an engagement and starting to interview for next engagement and studying like crazy to prepare for all those interview questions. Yes, prototype and classes came up in one interview and I stumbled all over the answers. I'm from New York City, enjoyed seeing the city out of your window. Miss it. Moved to Tampa 5 years ago and looking forward to moving back.

    • @ColorCodeio
      @ColorCodeio  Před rokem

      I miss my view too, although I'm still in NYC. Best of luck to you on your interviews. Let me know if I can help.

  • @videoklubi
    @videoklubi Před rokem +1

    The best explanation ever. Plus, a really good vibe.

  • @vladislavamarkova8379
    @vladislavamarkova8379 Před 2 lety +2

    Another useful, informative and so nice to follow video from the sequence! I like your new studio, it looks, how to say, open and brighter, miss a little bit the live coding. I am looking forward for the next "Closures" video. Wish you all good! : )

    • @ColorCodeio
      @ColorCodeio  Před 2 lety

      Closures video posted today: czcams.com/video/aHrvi2zTlaU/video.html

  • @danivermel
    @danivermel Před rokem +1

    Very well explained!

  • @raulnardone7062
    @raulnardone7062 Před rokem +1

    Very clear and concise. Many thanks !

  • @justingarner5425
    @justingarner5425 Před 2 lety +2

    great video I had to subscribe because the production quality was so good thank you so much for a tutorial that a human can understand

  • @pedrolelis7854
    @pedrolelis7854 Před 2 lety +1

    I just found your content and this is the first video I watch! Actually I agree with the last comment... why don't you have more subs!? Thanks for the amazing explanation! Quite easy to understand! Hugs from Brazil!

    • @ColorCodeio
      @ColorCodeio  Před 2 lety

      Welcome aboard! Sending you hugs back to Brazil from New York City.

  • @brunog2766
    @brunog2766 Před 3 měsíci +1

    Yeah, I'm a Brazilian guy and i really liked this vídeo, thanks a lot!

  • @hrahman3123
    @hrahman3123 Před 2 lety +4

    Welcome back!

  • @UncleNabs
    @UncleNabs Před 2 lety +1

    Video Quality is really top notch! First thing I noticed, now to learn

  • @Ratchet2022
    @Ratchet2022 Před rokem +1

    Wow! This really takes away the mystique of higher order functions for me after years of programming in TS. How they work is obvious to me now, hence this video did its job. I just never really gripped how functions sent in as arguments run the code for each element in a collection, but now seeing you write these higher order functions, I see how they do the processing in a black box just like they would for any other primitive argument type. Thank you!

    • @ColorCodeio
      @ColorCodeio  Před rokem +1

      Thanks for a great comment! Glad the video was helpful for you.

  • @devesh21
    @devesh21 Před rokem

    Loved it ❣️

  • @fatahbe7667
    @fatahbe7667 Před rokem

    Best channel: it was very good Sina

  • @jetbob309
    @jetbob309 Před 2 lety +1

    You earned my sub! Thank you for this clear explanation

  • @dev-vf5fm
    @dev-vf5fm Před měsícem

    This is a god-tier tutorial👏

  • @dev-vf5fm
    @dev-vf5fm Před měsícem

    this is a god-tier tutorial

  • @Looneytune
    @Looneytune Před 2 lety +2

    You guys deserve way more attention.

    • @ColorCodeio
      @ColorCodeio  Před 2 lety

      Thanks LooneyTune. Great name by the way 👍

  • @chrisdietrich1533
    @chrisdietrich1533 Před 2 lety +2

    Thanks for another great video!

  • @Aziz-kw6ct
    @Aziz-kw6ct Před rokem

    Great video, thnx for such content

  • @anithadharaneedharan6758
    @anithadharaneedharan6758 Před 8 měsíci +1

    wow .. That was a perfect video which was totally engaging and crystal clear.

  • @user-kn4oi9oh4i
    @user-kn4oi9oh4i Před 3 měsíci +1

    Good fellas ❤ I just watched it awhile ago, what a coincidence!

  • @ludwigvillalba1886
    @ludwigvillalba1886 Před rokem +1

    Thanks for sharing!

  • @ivandedic3857
    @ivandedic3857 Před rokem +1

    best explanation ever

  • @alialshaches6658
    @alialshaches6658 Před 6 měsíci

    i love this dudes videos lol , good shit big dog

  • @jatilyadav4000
    @jatilyadav4000 Před rokem +1

    Amazing and Informative as always .......Good luck

  • @averageguys_sa
    @averageguys_sa Před rokem +1

    I'm studying to be a full stack developer, based in South Africa. I've seen a lot of webdev tutorial videos online but I'm yet to see someone who does it better! 👌

    • @ColorCodeio
      @ColorCodeio  Před rokem +1

      Thanks and good luck with your studies!

  • @brolino11
    @brolino11 Před rokem +3

    How the hell does this video have less than 10k views? You're sooo good at explaining thi stuff, you deserve way more recognition. And btw, I'm subbing!

  • @Evildragonfirez
    @Evildragonfirez Před 2 lety +2

    Awesome Goodfellas reference

  • @user-mw5bm2xh9x
    @user-mw5bm2xh9x Před 8 měsíci +1

    thanks for the video

  • @robertobenedit
    @robertobenedit Před rokem +1

    Nice to discover you sir! fantastic tutorial

  • @scottbartlett6785
    @scottbartlett6785 Před rokem +1

    Random but i definitely had "Coffee shop radio 24/7 lofi hip hop beats" on while watching this and it made it even better. regardless, thank you for being eloquent and still throwing some jokes in.

    • @ColorCodeio
      @ColorCodeio  Před rokem

      You’re speaking my language. Love lofi beats when coding 🎧

  • @mohithp8700
    @mohithp8700 Před rokem +1

    It was really useful I was doing challenges in leetcode and there are many challenges related to HOF You earned a subscriber

  • @Pareshbpatel
    @Pareshbpatel Před rokem

    The essentials of Higher Order Functions in JavaScript; so succinctly explained. Thanks, Sina
    {2023-06-21}

  • @xpkareem
    @xpkareem Před 2 lety +1

    Helpful.

  • @syedaun5410
    @syedaun5410 Před 2 lety +4

    Please do a series on basics of React or React Native. But I guess then the audience will be very limited as you are still growing, but your work deserves a lot more views, fantastic work!!!

  • @bmehder
    @bmehder Před 2 lety +1

    I like the new format with no code typing. I did not even notice it until you said something about it. I think you might be on to something here.

  • @mdshoharabpk1126
    @mdshoharabpk1126 Před rokem +1

    thanks for your tutorial.

  • @longingbydesign
    @longingbydesign Před 2 lety +1

    I really liked the old setup with the window ALOT better. Also your voice sounded better in the old setup. In the new one you clearly hear the resounding from the walls.

    • @ColorCodeio
      @ColorCodeio  Před 2 lety +2

      Unfortunately I won't have access to the old studio anymore :( Good catch on the audio. The space is so new and the sound acoustics haven't been installed yet.

  • @KalenNorton
    @KalenNorton Před 2 lety +1

    Awesome 👏🏾

  • @genesipes8532
    @genesipes8532 Před 2 lety +1

    Awesome show!

  • @leonnorlazami2304
    @leonnorlazami2304 Před rokem +2

    You got yourself a new subscriber! I'm having a hard time with functions and this somehow helped me understand ( still need more practice tho, any suggestions?)

    • @ColorCodeio
      @ColorCodeio  Před rokem +1

      Build build build. That's the best way to learn.

  • @jasonlago5129
    @jasonlago5129 Před rokem +1

    Youre the most underrated youtuber on the youtubes

  • @davidmmadden
    @davidmmadden Před 2 lety +1

    Great video. New pre-created text is easy to follow but I much prefer the live coding because it shows examples of how you think through things. Also miss the NYC window, it made it feel informal and comfortable, but I'm sure you had practical reasons for the shift.

    • @ColorCodeio
      @ColorCodeio  Před 2 lety

      Thanks Dave. I’m actually just a block away from the old studio but unfortunately I had to move on. Thanks for the feedback.

  • @WineMusicWith
    @WineMusicWith Před 6 měsíci

    still in love with background music:))))

  • @andrew.schaeffer4032
    @andrew.schaeffer4032 Před rokem

    Great videos thank you. Just one thing I think could make them better would be if they were shorter/more concise.

  • @ibrahimyoussef4489
    @ibrahimyoussef4489 Před rokem +1

    your voice beautiful , your joking is funny , your explanation is great, every time I see you - even in something I knew before - I benefit from new and very useful information and some funny as well😅 , Thank you Sina❤

  • @Danny-wu5ct
    @Danny-wu5ct Před rokem +1

    THIS content is better than my bootcamp's content

  • @psycodeveloper9001
    @psycodeveloper9001 Před 2 lety +3

    Why the hell don't you have more subscribers?? Your content is soo good... Loved it. Subscribing

  • @asauu4745
    @asauu4745 Před 2 lety +2

    guy deserves more subs!

  • @shaikhanuman8012
    @shaikhanuman8012 Před rokem

    Thanks 🙏

  • @xv3lito378
    @xv3lito378 Před 2 lety +2

    Great video! Very helpful. Also, I like your taste in films. Dark Knight and Goodfellas are great. ;)

  • @saeed8641
    @saeed8641 Před 2 lety +1

    عاشقتم سینا . تو بهترین استاد جهانی بهت افتخار میکنم

  • @bob_bobsen
    @bob_bobsen Před rokem +1

    nice clean background - great info on video

  • @anontar6316
    @anontar6316 Před 10 dny

    Just stumbled my way here.. was looking for a high order function deff and was prepared for a boring sleepy video... but boy was I wrong.
    Btw... I will look over your playlist... but I think you should create an entire course... if you can and have the time of course

  • @abelmarkos5753
    @abelmarkos5753 Před 2 lety

    Hello and very well explained topic
    How can you build your own higher order function
    Can you make a video about making our own higher order function like map or filter or reduce

  • @himabindhu4831
    @himabindhu4831 Před 3 měsíci

    enjoyed learning!

  • @weibinren92
    @weibinren92 Před rokem

    Could you also explain in more detail function factories?

  • @balighghaleb4021
    @balighghaleb4021 Před rokem +1

    thanks alot

  • @charlesfulnecky1974
    @charlesfulnecky1974 Před 2 lety +2

    Higher order functions FTW. Very handy in combination with Redux-Observable with or without React 😁

    • @ColorCodeio
      @ColorCodeio  Před 2 lety

      Yes! The functional master has spoken!

  • @pharmacistbuilder
    @pharmacistbuilder Před rokem

    finally someone i can understand

  • @dedmanraizd
    @dedmanraizd Před 2 lety +1

    I've run into many tutorials describing what callbacks are but don't go into the specifics of why it's needed. I've always struggled to find the value of a callback; for instance, why do functions like setTimeout(), array methods, addEventListeners, need a function as a parameter instead of using primitive types to tell it what to do? Thanks so much for explaining this. Cheers!

    • @ColorCodeio
      @ColorCodeio  Před 2 lety +1

      Glad it helped!

    • @dedmanraizd
      @dedmanraizd Před 2 lety

      @@ColorCodeio Just to clarify, if a function by definition is what something does, how should we see primitive types as?

  • @TheAcidMotion
    @TheAcidMotion Před 2 lety +1

    As usually, super informative episode. Funny too, just not sure how much joe pesci would agree there ;)

  • @chenzierkabrabam3060
    @chenzierkabrabam3060 Před rokem

    The way you explain code is easier to understand. I request you to record a content about React stuff if possible. Happy coding.

  • @webdeveloper2769
    @webdeveloper2769 Před 2 lety +1

    he deserves 1 million subscribers

  • @ataurahmandaudzai8198
    @ataurahmandaudzai8198 Před 5 měsíci

    Thanks Dear So much Funny

  • @techbro3085
    @techbro3085 Před rokem

    This Channel is like Oasis in the big desert called JS🙃.
    Just a suggestion sir, along with youtube reels, you can post your linkedin account also here to get more audience attention.

  • @joshua_hc_cr
    @joshua_hc_cr Před rokem +1

    Like the new studio, or old I dunno 😅😂
    Thanks for the explanation.

  • @TheReadWellPodcast
    @TheReadWellPodcast Před 2 lety +1

    I'm pretty sure you're the coolest programmer ever.

  • @mohammadmirzaei9941
    @mohammadmirzaei9941 Před rokem +2

    عالی بود ایول

  • @tushar207
    @tushar207 Před 8 měsíci +1

    God level stuff!

  • @Vikram_Naik
    @Vikram_Naik Před 9 měsíci +1

    ThankYou sir,
    May i know how to prepare those stunning animated ppt/slides...

    • @ColorCodeio
      @ColorCodeio  Před 9 měsíci

      I manually create the animations myself in Final Cut Pro and Apple Motion

  • @fluffybubble6872
    @fluffybubble6872 Před 2 lety +1

    This channel is soooo underestimated

  • @samankushwaha6188
    @samankushwaha6188 Před 3 měsíci

    function call stack is where i confuse all the time in HOF

  • @Uri.Sab.
    @Uri.Sab. Před rokem

    Do you have testing code videos?

  • @Rocker0jeda
    @Rocker0jeda Před 5 měsíci

    Why so serious 😂😂😂, thank you for ur videos it helped me alooot.

  • @maciekdzikdrums
    @maciekdzikdrums Před měsícem

    King

  • @kodnzikus
    @kodnzikus Před rokem +1

    good stuff