JavaScript ES6 Arrow Functions Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ก.ย. 2019
  • 👉 Become A VS Code SuperHero Today: vsCodeHero.com
    In this video, I will explain arrow functions in JavaScript ES6. Arrow functions make your code shorter and more concise. They also handle the scoping of "this" in a more logical way than regular functions.
    _____________________________________
    📚 Learn to CODE in just a FEW months here:
    Treehouse Discount Code: treehouse.7eer.net/codeSTACKr
    _____________________________________
    🛠️ Tools I use:
    🟠 Theme: marketplace.visualstudio.com/...
    🟠 Font: STACKr Code (Exclusive to my VS Code Course - vsCodeHero.com)
    🟠 SuperHero Extension Pack: marketplace.visualstudio.com/...
    🚢 Deploy for FREE on Vercel: vercel.com/ambassadors/codest...
    _____________________________________
    💖 Show support!
    PayPal: paypal.me/codeSTACKr
    _____________________________________
    Watch Next:
    Web Development - Beginners Roadmap (2020) - • Web Developer Roadmap ...
    Playlist: Web Development For Beginners - • Web Development - Begi...
    _____________________________________
    Connect With Me:
    Website: www.codestackr.com
    Twitter: / codestackr
    Instagram: / codestackr
    Facebook: / codestackr
    _____________________________________
    ** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.
    #codeSTACKr #JavaScript #learntocode
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 58

  • @codeSTACKr
    @codeSTACKr  4 ปีที่แล้ว +2

    Thanks for all of the support!!
    Next up JavaScript Crash Course:
    th-cam.com/video/d5ob3WAGeZE/w-d-xo.html
    📚 My Favorite Web Design Books 📚
    Web Design with HTML, CSS, JavaScript and jQuery Set by Jon Duckett (paid link)
    amzn.to/2JaiCL8

  • @thetowerfantasymusic
    @thetowerfantasymusic 3 ปีที่แล้ว +8

    This is the simplest, slow paced (which is good) and most straightforward video i've seen. For a junior Front-end Dev, I never could understand these from other youtubers because they're all over the place.

  • @ickimadrasi8965
    @ickimadrasi8965 4 ปีที่แล้ว +10

    Great series, I love it, can't wait for the React.Js

  • @mizaelparedesvielma8221
    @mizaelparedesvielma8221 4 ปีที่แล้ว +4

    This video was really like taking off in some details that I wasn't sure about. Thank you so much.

    • @codeSTACKr
      @codeSTACKr  4 ปีที่แล้ว

      Thanks for watching!

  • @zackcordle4814
    @zackcordle4814 2 ปีที่แล้ว +1

    Very easy to understand thank you. For some reason I had trouble wrapping my head around arrow functions but this made the subject so much more comprehensible.

    • @codeSTACKr
      @codeSTACKr  2 ปีที่แล้ว +1

      Glad it helped!

  • @najimali32
    @najimali32 4 ปีที่แล้ว +1

    I was messed with arrow function & now you make it easy to learn.
    thanks a lot, man!!

    • @codeSTACKr
      @codeSTACKr  4 ปีที่แล้ว

      Glad I could help!

  • @anasslebkhaiti7840
    @anasslebkhaiti7840 4 ปีที่แล้ว +3

    i can say this is one the top three js course in youtube thank you for sharing your knowledge with us

  • @TheDevilscrap
    @TheDevilscrap ปีที่แล้ว +1

    Great video, essential and clear , thx

  • @akasharojee8569
    @akasharojee8569 2 ปีที่แล้ว +1

    Good overview of arrow functions with examples. Thanks!

    • @codeSTACKr
      @codeSTACKr  2 ปีที่แล้ว +1

      Glad it was helpful!

  • @keissetje
    @keissetje 3 ปีที่แล้ว +1

    Thanks for a very concise explanation of arrow functions. Exactly what I needed.

    • @codeSTACKr
      @codeSTACKr  3 ปีที่แล้ว

      Glad it was helpful!

  • @webcoderltd
    @webcoderltd 2 ปีที่แล้ว +1

    Great video and finally understood it - would be nice to also explain how arrow functions affect hoisting.

  • @emmanuelobonyo291
    @emmanuelobonyo291 2 ปีที่แล้ว +1

    Thanks for this. Explained perfectly.

  • @Lyrik-Klinge
    @Lyrik-Klinge ปีที่แล้ว

    Great stuff, THANKS 🙂

  • @simple8810
    @simple8810 3 ปีที่แล้ว +1

    this 9 mints video explained everything about arrow thanks man

    • @codeSTACKr
      @codeSTACKr  3 ปีที่แล้ว +1

      Glad it helped!

  • @nostalgic6979
    @nostalgic6979 3 ปีที่แล้ว +1

    I watched other videos about arrow functions and they confused me a lot, I almost gave up on the whole thing..then I found this lesson, well explained and very clear..thank you sir for saving me

    • @codeSTACKr
      @codeSTACKr  3 ปีที่แล้ว +2

      I'm glad it helped!

  • @shahidullahmiazi
    @shahidullahmiazi 4 ปีที่แล้ว +2

    Now Arrow function is mine পানি ভাত। ধন্যবাদ a lots.

  • @jessemccallums2448
    @jessemccallums2448 ปีที่แล้ว

    pretty good video!

  • @STRIPPEDSTAR
    @STRIPPEDSTAR 4 ปีที่แล้ว +1

    That was great)

  • @felix-ej9in
    @felix-ej9in 3 ปีที่แล้ว +1

    well explained

  • @ridwanajibari4443
    @ridwanajibari4443 4 ปีที่แล้ว

    thanks for your explanation, subscribed. btw what extension u used to see the result directly in terminal once you saved the file?

    • @najimali32
      @najimali32 4 ปีที่แล้ว

      he is using live server.

  • @VK-yk7sx
    @VK-yk7sx 3 ปีที่แล้ว +1

    Good 👍

  • @imrexx93onit91
    @imrexx93onit91 ปีที่แล้ว

    Please how do you make the console below to show the output of your JS code. please am really confused. i can't run my js, only on VS code

  • @zabinoori49
    @zabinoori49 10 หลายเดือนก่อน

    nice💕💕👌👌

  • @ashwanikumar183
    @ashwanikumar183 3 ปีที่แล้ว

    for console how you are opeing in vs code? what is the extension???

  • @harshal.rathore
    @harshal.rathore 2 ปีที่แล้ว

    So is an anonymous function same as the Lambda function of python??

  • @ismailbakhach8990
    @ismailbakhach8990 ปีที่แล้ว

    how can i see the console in vs
    Code ?

  • @FrancoisBeyers
    @FrancoisBeyers 4 ปีที่แล้ว +2

    what extension do you use to console log in VS Code?

    • @codeSTACKr
      @codeSTACKr  4 ปีที่แล้ว +5

      Well.. it's kind of a trick. If you look closely, the bottom of the VS Code window stops above the console. It's actually the chrome console running via the live server extension in VS Code :)
      But if you do want to run it within VS Code you could use the terminal and Node.js.

    • @FrancoisBeyers
      @FrancoisBeyers 4 ปีที่แล้ว

      codeSTACKr haha yeah I was watching one of your other videos and then got the idea that is the chrome console.

  • @lilibethepis5867
    @lilibethepis5867 3 ปีที่แล้ว

    how did you get console at vscode?

    • @codeSTACKr
      @codeSTACKr  3 ปีที่แล้ว

      It's just the Chrome console

  • @milenastankovic4706
    @milenastankovic4706 3 ปีที่แล้ว

    Why you used ${a} when you returned the string??

    • @codeSTACKr
      @codeSTACKr  3 ปีที่แล้ว

      a is the variable that will be placed into the string.

  • @jx4997
    @jx4997 4 ปีที่แล้ว

    Hi, thanks for making the video, I watched most of your videos on your channel. Enjoying watching them. :) When I followed this video, I got an error (SCRIPT5007: Unable to get property 'addEventListener' of undefined or null reference) when running the codes at th-cam.com/video/NAN7U3MrX6o/w-d-xo.html (6:11), found that it could due to demo is not declared before load event. Just wondering why you did not have the same problem.

    • @codeSTACKr
      @codeSTACKr  4 ปีที่แล้ว

      Where in your index.html file are you loading the JavaScript file? If you are loading it in the head of the document you could get this error. It should be just before the closing tag. Give that a try and let me know.
      Thanks for your support!

    • @jx4997
      @jx4997 4 ปีที่แล้ว +2

      ​@@codeSTACKr Bingo, that was the issue. Fixed. Thanks!

  • @gill78618
    @gill78618 3 ปีที่แล้ว

    thanks im a beginner and
    im thirteen

  • @alejandragomez3726
    @alejandragomez3726 3 ปีที่แล้ว

    anyone know of a tutor that can help me with javascript? I am so lost. I am taking a javascript class right now and we had a hw assignment and it took me forever to figure out normal JS syntax and then they want us to rewrite that assingment using arrow functions and I have never cried so much. Its been 3 weeks i've been staring at the same function trying to figure out how to change it to an arrow function!!

  • @davidschwartz2485
    @davidschwartz2485 4 ปีที่แล้ว +1

    when i try to run the code with let message = (a) => 'hello ${a}; and then console.log it, everytime i save i lose the parethesis around the a and then the console log is hello ${a} only . why does vs code format like this and lose the parenthesis? its been driving me nuts. i tried adding the brackets back after the arrow and still the same thing happens. any ideas why?

    • @codeSTACKr
      @codeSTACKr  4 ปีที่แล้ว

      The parenthesis are optional there. It's being removed by one of your installed extensions but should not be an issue. Are you using backticks around the string? `hello ${a}`

    • @davidschwartz2485
      @davidschwartz2485 4 ปีที่แล้ว

      @@codeSTACKr yes i just keep getting the "hello ${a}" instead of Hello John. i checked my extensions and installed eslint and changed my formatter from prettier so that the punctuation stays the same. neither of those options are working. appreciate the help

    • @johncarloformentera2678
      @johncarloformentera2678 4 ปีที่แล้ว

      Use backticks(` `) sir instead of quotations (" ").

  • @aliabukahil
    @aliabukahil 3 ปีที่แล้ว +1

    Man, you are The Wizard of all MF Wizards! thanks, bruh I appreciate it

    • @codeSTACKr
      @codeSTACKr  3 ปีที่แล้ว +1

      I appreciate that

  • @masgozaimas
    @masgozaimas 2 ปีที่แล้ว

    You talk like you're about to fall asleep!

  • @behrad9712
    @behrad9712 ปีที่แล้ว

    Your Java Script videos on your roadmap are bad, they not precise! you didn't explain if the console not showing result in liveserver, how we can solve the problem in order to be able to follow your course!, in the HTML course, for example, you do not explain the file path I don't know why this is so important for beginners!?