• Tuesday , 31 March 2020

16.3: ES6 Arrow Function – Topics of JavaScript/ES6

Code Canyon

In this video, I cover anonymous functions with the arrow syntax in ES6 JavaScript.

Next Video on ES6: https://youtu.be/Y8sMnRQYr3c

Support this channel on Patreon: https://patreon.com/codingtrain
To buy Coding Train merchandise: https://www.designbyhumans.com/shop/codingtrain/
To Support the Processing Foundation: https://processingfoundation.org/support

Send me your questions and coding challenges!: https://github.com/CodingTrain/Rainbow-Topics

Twitter: https://twitter.com/shiffman
The Coding Train website: http://thecodingtrain.com/

Source Code for the all Video Lessons: https://github.com/CodingTrain/Rainbow-Code

p5.js: https://p5js.org/
Processing: https://processing.org

For an Intro to Programming using p5.js: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
For Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

Help us caption & translate this video!


📄 Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct

Original source

3d Ocean

Related Posts


  1. Oghenerukevwe Kofi
    November 18, 2019 at 18:55

    conciseness is not a valid reason for doing this tbh. It's so difficult to read…. it's not worth the conciseness. Why are we all having to use Javascript… I freaking hate javascript.

  2. Ade S.
    November 18, 2019 at 18:55

    14:3114:41 priceless!

  3. Paulo Jose Castro
    November 18, 2019 at 18:55

    Readable es5 Js making it harder and unique to other languages using es6, you're not really making this easy es6 I have other languages to maintain too. This is spooky indeed

  4. victor G
    November 18, 2019 at 18:55

    I agree, to try new thing in programming is also interesting/exiting/spooky/terrifying/and whatevea, I used to avoid these things, but even if you say there is no reason to be afraid of them, you will always find something you don't want to start using, thanks Theacher Shiffman for encouraging us to try new things

  5. David Rak
    November 18, 2019 at 18:55

    Let Like => true

  6. Roy
    November 18, 2019 at 18:55

    I legitimately can't tell which of the errors were intentional and planned and which were surprise errors that he expected to work. Fascinating to see him troubleshoot live though. Also Happy Halloween!

  7. Rayaqin
    November 18, 2019 at 18:55

    its a bit over the top for me, but the explanations are fine

  8. Soul
    November 18, 2019 at 18:55

    23-10-2019 I'm also watching it near halloween don't worry

  9. Craig Schultz
    November 18, 2019 at 18:55

    It's unfortunate that PHP's "=>" syntax has a totally different semantics than ES6's. That's going to confuse people. 🙁

  10. Romark George Armor Palaganas
    November 18, 2019 at 18:55

    Literally watching it now and Halloween is so close. =

  11. Adolf Buttheimer
    November 18, 2019 at 18:55

    Amazes me how stereotypical all nerds are still in this day. Like flamboyant gay kids basically..

  12. Aihab A M Gmati
    November 18, 2019 at 18:55

    You are the best

  13. Deep Inside
    November 18, 2019 at 18:55

    is he homo?

  14. ObyMikelPS3
    November 18, 2019 at 18:55

    You are amazing. It didn't solve my question but… I learned new amazing things and also discovered you. From a begginer in programming in Spain, thank you and keep it up!

  15. Aundre Lattie
    November 18, 2019 at 18:55

    It feels like you lose all transparency when you use this operator. It's cool to use it for lambda operations, but people are using this to make pointless one-liners.

  16. Rafael Nercessian
    November 18, 2019 at 18:55

    Wow, you are awesome.
    Cheers from Brazil 🙂

  17. Christopher Gonzalez
    November 18, 2019 at 18:55

    This is what a man who loves coding and teaching looks like!

  18. anony mous
    November 18, 2019 at 18:55

    the whole arrow function can be improved in JS honestly. Instead of doing this: button.mousePressed(() => background(random(255))); , you should be able to do this: button.mousePressed(>background(random(255))); … JS should understand what that means. It should say "oh, no arguments? ok. uhm. But I see a right arrow, so it looks like an arrow function" and know what to do under the hood. It can't be that complicated to make for JS as an alternative to the first example at the top of this comment. I'm newer to JS, but that's just an observation. Also, being new, I'm not sure if this is possible or not, but we should be able to do r(255) for a random value by default instead of random(255). I know you can make a new function called r and essentially do the same thing.
    Also, it would be nice if we could create one line functions in JS without doing anonymous arrow functions and it's not being called from inside a method of some sort. I'm not sure if it's possible or not, but at first glance on Google, it's not. Something like this "function myFunction({(greeting) => return alert("hey")})" on one line. I don't even think that would work but it's an idea.

  19. 1flybyguy
    November 18, 2019 at 18:55

    Rick? Rick Moranis, is that you????

  20. Dredious
    November 18, 2019 at 18:55

    Be great if Coding Train touched on say Python.

  21. Marcus W
    November 18, 2019 at 18:55

    Watching 22 minutes of him not having a clue how a class in es6 should look like.

  22. Ailiniyazi Maimaiti
    November 18, 2019 at 18:55

    oh my god, you made my day easier……thank you!~!

  23. NiTiN
    November 18, 2019 at 18:55

    You are a great teacher.But the face of curly brackets you make are so ugly that only a mom could it 😉

  24. Ritik Khatri
    November 18, 2019 at 18:55

    Yes , sure 22:10 😉

  25. Trolland Drump
    November 18, 2019 at 18:55

    Never in my entire life have I ever felt so much discomfort and anxiety over something as trivial as 2 bytes of tormenting equality symbols! Some nights when I don't get some sleep, I think it's because of the => like it's some kind of evil emoji jeering at me.

  26. Sarang C V
    November 18, 2019 at 18:55

    Who's this spooky guy? He's kind a awesome…and very understandable though. 😀

  27. Isaac Douglas
    November 18, 2019 at 18:55

    this guy has me dead

  28. Dr Oetker
    November 18, 2019 at 18:55

    Are arrow functions the same thing as lambda expressions?

  29. Ahmed Dlshad
    November 18, 2019 at 18:55

    Half of us don’t know what is computer language others know about html and JavaScript or some other language and we have some beginners and some advance and a few expert that function short cut only for experts witch it we don’t have much expert also experts won’t watch that video so the short cut for beginners and advance not help him including me

  30. Adi Vid
    November 18, 2019 at 18:55

    Hi Dan,
    As a beginner, I just want to let you know that your error is more valuable than the actual code that works. It saves me hours of time to figure out what's wrong with my code. That is why I always following your channel and reproducing the code that you made. Thanks for the information sharing.

  31. Elijah Jackson
    November 18, 2019 at 18:55

    This guy moves so much it gave me a siezure

  32. SharisM
    November 18, 2019 at 18:55

    Great video, thanks!

  33. Nurul Insani Dewi
    November 18, 2019 at 18:55

    2:08 function don't go away from me

  34. Nik depressedLasagna
    November 18, 2019 at 18:55

    You are very handsome

Leave A Comment

You must be logged in to post a comment.