ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

Javascript Function Expression Vs Declaration For Beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 พ.ย. 2018
  • Understand the difference between a javascript function expression vs declaration. The primary difference is that a function declaration loads before any code is executed. a function expression loads only when the interpreter reaches that line of code.
    ________________________
    ▶ Pluralsight 10-day free trial: pluralsight.px...
    ▶ Web Hosting: www.bluehost.c...
    ▶ Buy me a Coffee: ko-fi.com/w7w5...
    ▶ Check out my gear on Kit: kit.com/DevMat...

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

  • @codewithdallah
    @codewithdallah 2 ปีที่แล้ว +6

    2:52 When we use Function Expression, We call it Initialization of a function. So we initialize a function to a variable.

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

    That ending made me blush 😊 great video

  • @LoneSeraph0
    @LoneSeraph0 3 หลายเดือนก่อน

    Liked for the transparency at the end 😂

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

    This have me the aha! moment I needed 👍

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

    thank you very, this helps a lot, also thank you for including the discussion of hoisting

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

      Glad it was helpful!

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

    Straight to the point ❤

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

    Very well explained. Thank you! I'm bookmarking this video for later.

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

    Nice music in the end

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

      This is me just from a different account, Hi :D

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

    Thanks a lot. that was straight to the point. and the Doo do do doo killed me 😂😂

  • @TheCrusaderRabbits
    @TheCrusaderRabbits 5 ปีที่แล้ว +2

    How did he get console.log to print to the screen? Is he using Visual Studio?

    • @DevMaterial
      @DevMaterial  5 ปีที่แล้ว +3

      Im using an extension called "Quokka" for Visual Studio Code 😛

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

    it helped me a lot , thank you!

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

    So it just like a function...
    Can be called only after it declared
    We can call it multiple times anywhere anytime once its been
    declared...
    It takes the name of the variable instead of giving name after we write function keyword?

  • @xox3133
    @xox3133 5 ปีที่แล้ว +2

    hi, may i know what extensions you used to make the output/error shows on the script?

    • @DevMaterial
      @DevMaterial  5 ปีที่แล้ว +3

      The extension is called “Quokka”

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

      @@DevMaterial thanks!

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

    What if you use var instead of let, the variable will get hoisted and everything will be the same

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

    good video and clear explanation. thank you

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

      Happy to help 🙏

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

    in case you declare that function with const instead let, it'd have the same behavior?

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

      Yep, the function would have same behavior. The difference is that wouldn't be able to re-assign the value (the function in this case) that is within the const.

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

    Massive help! Thank you! - Subscribed :)

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

    Thanks for the video

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

    What's the extension you're using in order to get the result right on VScode?

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

      console ninja probably

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

    thanks man !

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

    thank you!

  • @Triple109
    @Triple109 5 ปีที่แล้ว

    Can you do the centuryfromyear in java?

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

    thank you

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

    Good luck

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

    duru du duuuu duru duuuuu... duru duuuu !!

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

    du du duuuu du du duuuu

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

    Javascript is stupid