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

  • @ylioo
    @ylioo 7 ปีที่แล้ว +77

    This is how you explain it, idk what's up with this 20 min vidoes, let vs var vs const

    • @kotoriitsuka1097
      @kotoriitsuka1097 5 ปีที่แล้ว +9

      Sometimes it seems like ppl do philosophy...

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

      Yeah, we are missing scope a little bit in depth here, what happens when its inside a function as CONST? and as Var? inside an if statement? etc...

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

      check mmtuts video on this. The best!

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

      jesus christ, no kidding. it was hell trying to find this beautiful explanation, i literally only needed to hear the first minute of it to understand.

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

    Best exact ,to the point,explanation. Beautiful.

  • @_runic
    @_runic 3 ปีที่แล้ว +11

    tl;dr
    let - local variables that can be changed
    var - global variables that can be changed
    const - constant variables that cannot be changed

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

      Fucking thank you. Scoured the internet for this answer.

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

      @@TealDaubs lol never thought this would help anyone

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

      *tl;dw

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

      @@martiananomaly no, *tl;dr. look it up

  • @pratikpokharel5490
    @pratikpokharel5490 3 ปีที่แล้ว +7

    crisp and clear,covered everything needed less than 4mins.THANKS

  • @mikestuff2114
    @mikestuff2114 6 ปีที่แล้ว +10

    Thank you for keeping it short and to the point.

  • @PratikRatnaparkhi
    @PratikRatnaparkhi 7 ปีที่แล้ว +15

    go beau! go beau! I love this guy!

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

    In less than 4 minutes you explained to me in an easily understandable manner what 30 minute videos and several pages of documentation couldn't get through my skull. Thank you!

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

    Thank you once again Beau for clarifying.

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

    Thank you for making this 80 times easier than Codeacademy lol

  • @mirataoskoi5855
    @mirataoskoi5855 8 หลายเดือนก่อน

    Guys what do you think I should do : keep learning JS or start working as a content manager for a company?

  • @batfan1939
    @batfan1939 7 ปีที่แล้ว +2

    Does this mean we don't need to change or "increment" _i_ anymore? We can use _let_ in loops, and have all of them be _i = foo,_ _i < bar,_ _i++?_

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

    Everything is clear to me now. Thanks for explaining the difference between const, let and var.

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

    Very helpful. Thank you!

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

    ok the var and const is easy thing to remember when first learn, so the let key point is scoop right?

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

    Thanks a lot dude..

  • @theonewhodoesPoland
    @theonewhodoesPoland 7 ปีที่แล้ว +3

    Clear explanations, thanks for sharing!

  • @pleabargain
    @pleabargain 7 ปีที่แล้ว

    Many thanks! Much clearer now!

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

    you can push to a const variable thats important (:

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

    On point thankyou :)

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

    without explanation on hoisting, it is not clear why 'var' variable is already available even before it is defined.

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

      It actually is. The JS engine 'hoists' a variable assigned with the var keyword out of the flow before it starts executing synchronously.

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

    That helped a great deal thanks.

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

    for(var i=1;i

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

    Thank you!!!!!!!!!!!!!!!!!!!!!

  • @trappedcat3615
    @trappedcat3615 7 ปีที่แล้ว +2

    I just use var, closures, and caps to indicate constants. I'll use const and let in 5 years once I don't need to depend on a compiler to interpret them.

    • @BeauCarnes
      @BeauCarnes 7 ปีที่แล้ว +2

      Some people think you should never use var. I wouldn't go that far, though. 😃 medium.com/javascript-scene/javascript-es6-var-let-or-const-ba58b8dcde75#.sn9gfcmp6

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

      Beau Carnes I'm looking forward to never using var

  • @khaouladjouabi7270
    @khaouladjouabi7270 7 หลายเดือนก่อน

    what is the name of this complier ?

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

    var also binds itself to window object, but let and const dont do that

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

    thanks bro

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

    And if you use for(i = 0; i < 3; i++) without assigning neither let nor var keyword, the i becomes global variable.

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

    let: block-lvl VARs - values can be changed
    const: values never change
    var: srsly u don need an explaination for dis:)

  • @truptisutar2975
    @truptisutar2975 6 ปีที่แล้ว

    good explanation

  • @SamiNami
    @SamiNami 7 ปีที่แล้ว +2

    Thanks

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

    This guy makes you think you're watching this video at 1.5x speed

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

    Bro ...what are the basic things are known in js

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

    Based.

  • @debjyotichattopadhyay6679
    @debjyotichattopadhyay6679 5 ปีที่แล้ว +9

    watched at 0.5* speed

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

      i can feel you, 0.75 here

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

      slow CPU? "Human Processing Unit" LOL

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

    If we used code for hack, is that counting as for good, hack++ :D

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

    did you know that semicolons are optional? Why bother then?

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

      I’m new but it’s because sometimes they are required so it’s a good habbit to just use them even if they arnt

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

      Also most other C based languages do require them, so it's a good habit to get into if you ever end up moving to other languages 👍

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

      @@chexitout I disagree.
      We should do our best to use the language syntax and idioms.

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

    Ur voice is weird

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

    should you use let instead of var when you can or does it not really matter?

  • @sua4443
    @sua4443 7 ปีที่แล้ว

    should you use let instead of var when you can or does it not really matter?