The Best Way to Declare Variables in JavaScript?

Поделиться
HTML-код
  • Опубликовано: 22 окт 2024

Комментарии • 11

  • @It_guy613
    @It_guy613 Год назад

    Dcode you are the best! Everytime i get into a new topic in JS i ALWAYS look for your channel first to check if you have made a video about it, you are a life savior, thank you!

  • @edutainment9235
    @edutainment9235 Год назад +1

    I hope this gets the 1 million views it deserves! let and const are always explained in way (for me) that are overly complicated. While these concepts are some level of complex, your explanation was 😮😮😮 ❤ #thankYou3000

  • @smoothbeak
    @smoothbeak Год назад

    3/3, fun little experiment.

  • @karlstenator
    @karlstenator Год назад +1

    Myself being late to the JS game, tbh I never use var - and find myself leveraging both const and let through all my work. There's probably a random use case out there that exists for var, but I'm yet to find it.

  • @Gigusx
    @Gigusx Год назад

    Not really mind boggling but I guess it depends on how you learn. Scopes and hoisting were one of the first things I've learned when I started programming (which also was in Javascript), after the complete basics such as what's a variable, function, etc. of course. I've always used const and let exclusively and understood what's going on in the scopes, including the scopes that have var e.g. in some existing code.
    Whenever I see "var" used it's always a) old code, b) people who're learning and don't quite understand the concept, or c) people who've come from a different language and try to do things in Javascript the same way they would in the other language.
    The C group is actually very similar to when people learning a human language rely on translating things from their native language too much. Their grammar, word order, etc. is always off because they're basically relying on these fixed rules from their own language and try to replicate it word-for-word in the language they're learning (it never goes well).

  • @amoh96
    @amoh96 Год назад

    im new to channel your videos about js really cool !! keep it !! im learning Js i want to be really good any tips or advice ?

  • @angryman9333
    @angryman9333 Год назад

    I love ur content ❤

  • @skilful-mind
    @skilful-mind Год назад

    awesome

  • @DK-pf2dg
    @DK-pf2dg Год назад

    I think we should forget that var exist, I haven't used it for years.

    • @dcode-software
      @dcode-software  Год назад

      I see your point but unfortunately I still see it getting used very frequently

  • @Exsecrabilis
    @Exsecrabilis 2 месяца назад

    -08/22/2024 @ 2400-