7: How to Create Variables in JavaScript | JavaScript Tutorial | Learn JavaScript | mmtuts

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

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

  • @johanstam3602
    @johanstam3602 6 лет назад +30

    Thought var was dead.

    • @Dani_Krossing
      @Dani_Krossing  6 лет назад +42

      No "var" is still usable in the exact same way as before. Of cause we now have "let" which is nearly identical to "var" (minus the issue with scope declaration), but because so many existing websites today still has "var" used in them we still need to learn about "var". And I'm also sure there are still websites today being produced where "var" is still being used. But yes if you are asking me why I'm focusing on "var" in this lesson, it is because it is tough to talk about how "let" benefits the code when I haven't taught about scopes, loops or functions yet. But once I get there I will make sure to do a great episode on "let" and "const" ;) And mention that it should be considered to use it instead of "var".

    • @treenelson4063
      @treenelson4063 6 лет назад +23

      Let the saga begin
      Not so far away, and not so long ago in a land called Code, there was a king and his name was Var.
      He ruled over many lands. He was a good king but he had some problems. One of the kingdoms King Var ruled over had become very tired of King Var problems. This land was called JavaScript.
      One day in the land of JavaScript, some Integers, Sub Strings, and Boolean declared in a common statement, Var is King, Long live King Var, but throughout the kingdom of JavaScript there was silence.
      The land of JavaScript had chosen new rulers. A king and a Queen named King Let and Queen Const.
      Now what will become of the land of JavaScript, and their relationship to the other nations in the land of Code. What will become of their special partnership with the land of The Internet where King Var rules with an iron fist with Baron Von PSP. What about all the poor scribes, who will they follow?
      Will they follow King Var who they are familiar with, or the unfamiliar King Let who shares his power with Queen Const, whose time and paths are mostly unproven, and disconnected with the past. All of this will need to be fixed and rewritten. Here begins our mighty story.
      Let the saga begin.

    • @johanstam3602
      @johanstam3602 6 лет назад +11

      you have way too much time on your hands

    • @treenelson4063
      @treenelson4063 6 лет назад +3

      LOL
      let theSaga = "begin";
      //place hold till future time
      { null (); }
      Great stuff you have here, I'm so glad to have found your channel.
      you have a great gift at explaining things that can be rather confusing, and boring, in a clear, concise, and interesting way. kudos to you.

    • @6tvghananflschedulerelease811
      @6tvghananflschedulerelease811 2 года назад

      Please can you help me solve my problem? In JavaScript, when I write the word name then it council it doesn't work as a variable

  • @HamzaXAnime
    @HamzaXAnime 4 года назад +26

    Guys this is the best course out there for beginners. I've been bashing heads with JS for 10 days with different courses online and I didn't even understand the basics. But this guy explains it very well. Great Job!

    • @danielbarreto326
      @danielbarreto326 2 года назад

      I 100% agree with that .. Daniel has didatics.

  • @kerengan-or5418
    @kerengan-or5418 6 лет назад +26

    I want to thank you from the bottom of my heart. After many attempts to learn web development, you are the first one that makes me understand and enjoy what I am learning. I love and appreciate your thorough approach. You are a great teacher :)

    • @Dani_Krossing
      @Dani_Krossing  6 лет назад +3

      Thank you :) that means a lot to me to hear and I am glad you enjoy learning. That's how you get the most out of it!

  • @G2thesecondpower
    @G2thesecondpower 2 года назад +1

    I'm taking JS online through my local college, and we're primarily using the textbook. As I read and take notes in the text book, I often barely understand what I'm reading, if at all. It's been miserable. I've just watched two videos of yours, and already things are starting to make sense. You're explanations are clear, simple, and easy to follow. Cheers :)

  • @glendonnalpasan1191
    @glendonnalpasan1191 3 года назад +1

    sir i have been watching too many javascript tutorial videos but your tutorial series are the ones that really made sense, really understandable clear and precise. i also saw your OOP PHP tutorial it was easy to understand. thank you

  • @elainerodriguez6737
    @elainerodriguez6737 3 года назад

    Thank you for explaning var in the simplest way possible. Every video I've seen before this jumped to let and const right away but i need to learn the basics of var first. Thank you for doing this!

  • @lukeseavers9598
    @lukeseavers9598 6 лет назад +5

    Really loving this course so far! Hope you can come out with the next one soon!

  • @jonathanmacaulay7311
    @jonathanmacaulay7311 5 лет назад +1

    Very explanatory, easy to follow and understandable too. Thank you so much!!!!!

  • @zairisuhardimamat1379
    @zairisuhardimamat1379 3 года назад +1

    Thank you... Very good for beginner like me

  • @gearsdan
    @gearsdan 2 года назад

    hey daniel! im taking a web development bootcamp and just started JavaScript. Probably the hardest thing I am learning.
    I’m hoping that watching your videos will help me. I get so confused when making functions that include everything together lol. i cant even write a function for a simple guessing game 😢

  • @littlebird2573
    @littlebird2573 4 года назад

    you are so amazing thank you for sharing your knowledge with us. This is egalitarianism. THANK YOU.

  • @danielbarreto326
    @danielbarreto326 2 года назад

    Definitely 377K subs has a reason to be...kkk....Congrats for the quality of your material, man.

  • @Born2DoubleUp
    @Born2DoubleUp 2 года назад

    I'm here! 😎 Great video, just posting a comment to show some support! Keep up the good work. 🤙

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

    Good thought you have there. Keep on the good work.

  • @randoperson2330
    @randoperson2330 4 года назад +4

    You explain this way better than my computer science professor does 😅

  • @sannesofie
    @sannesofie 2 года назад

    Hej Daniel, jeg er startet i Oktober med at lærer HTML, CSS og nu JavaScript. Jeg bor i Belgien og følger et engelsk talende kursus her. Jeg er kørt lidt død i JS, synes det bare er rigtig mange ting på den gang. Jeg fandt dine videoer som jeg nu ser igennem og håber der går et lys op for mig LOL Tak fordi du har brugt tid på at lave disse videoer til at hjælpe andre (som mig) der gerne vil ind i IT branchen ;)

  • @nielsencs
    @nielsencs 6 лет назад +10

    As usual excellent work! One small point, however. A const is not a variable but a constant; variables can have their values changed (varied) but constants always have the value they are originally assigned. By the way, I wonder if we're related?! :D

    • @Dani_Krossing
      @Dani_Krossing  6 лет назад +3

      Yes you are absolutely right :) it sorta goes without saying that "var" (something that can varie in value), of cause can't be constant. I have a habbit of grouping var, let and const together, as "types of variables" since they are all similar tools used to store data.

  • @barbieno493
    @barbieno493 4 года назад

    I like your style of teaching, it's very clear :)

  • @0jd955
    @0jd955 6 лет назад +5

    I started supporting you on patreon!!

  • @argenisaguilar9045
    @argenisaguilar9045 3 года назад

    Thanks very much for your great lessons...

  • @LosChudos
    @LosChudos 6 лет назад +1

    Good video, looking forward more advanced topics :)

  • @northbeachdata4878
    @northbeachdata4878 5 лет назад

    Thank you very much for these videos. You are doing excellent work and it is invaluable. I've become a patreon.

  • @lofiwithshamique
    @lofiwithshamique 2 года назад

    love these tutorials thank you!

  • @1990Cornetto
    @1990Cornetto 3 года назад

    Good explanation mate you earned a sub.

  • @MrJeske999
    @MrJeske999 6 лет назад

    Can you make a video about how you create tabs and nested tabs. that's should be great.
    your vids are very good for learnings!!
    Thank you!

  • @mariopizzaro
    @mariopizzaro 3 года назад

    Beautiful , thanks a lot

  • @deapostle7274
    @deapostle7274 6 лет назад +1

    awesome and great work!

  • @ewbg7749
    @ewbg7749 6 лет назад +1

    Great job! Thanks)

  • @wearedoritos5409
    @wearedoritos5409 4 года назад

    Thank you

  • @Defense89
    @Defense89 3 года назад

    very nice video , good job , i was wondering can we pass variable to href?

  • @G3Number
    @G3Number 5 лет назад

    Amazing explain! Liked and sub

  • @CreativeWorkersBest
    @CreativeWorkersBest 6 лет назад

    Awesome

  • @dezzac3066
    @dezzac3066 5 лет назад

    You mentioned that in some cases, you may want to use var a; a = 10 vs. var a = 10; . In what case would that occur? By the way, thanks for these solid videos!!

  • @robertm4795
    @robertm4795 4 года назад

    Good video

  • @user-sp8eb6iz7f
    @user-sp8eb6iz7f 2 года назад

    Dude, I have a javascript geolocating script, it works great, but how do I allow access to the info in my coldfusion code? Thx

  • @CreativeWorkersBest
    @CreativeWorkersBest 6 лет назад

    Please, make tutorial Wordpress Premium Plugin Development. Thank You.

  • @turikumanaisaie
    @turikumanaisaie 8 месяцев назад

    Well, I knew it, how can i multiply elements Ex( Div with text within) using javascript

  • @nayandas-jy6tw
    @nayandas-jy6tw 3 года назад

    this tutorial is old enough for 2021, lots of changes come in Javascript.

  • @seyedatheeq4562
    @seyedatheeq4562 2 года назад

    HELLO ,.... i have just started watching your javaScript videos ,.... but i have a doubt tha is your videos are still good to learn ? becaues is there any updates/someting new we should learn in javascript in 2022 ....? :-)

    • @Dani_Krossing
      @Dani_Krossing  2 года назад

      The videos are still perfectly viable :)

  • @loyalty_cham1042
    @loyalty_cham1042 5 лет назад

    Hi man can you please make tutorials on Java?

  • @flyhigh1153
    @flyhigh1153 4 года назад +1

    The codes I write within the script tag doesn't make color, please helpp

  • @MilanB
    @MilanB 6 лет назад

    Mate, what technologies should i know to develop Progressive Web Apps, are you familiar with that topic?

  • @6tvghananflschedulerelease811
    @6tvghananflschedulerelease811 2 года назад

    Please can you help me solve my problem? In JavaScript, when I write the word name then it council it doesn't work as a variable

  • @unkown215
    @unkown215 2 года назад

    there was a way to define a variable in middle of the code or print statement with = or something sign. I forgot, can someone tell me what it was.

  • @goldensleeves
    @goldensleeves 2 года назад

    At 7:45, where it still ran when you did not declare “a”, did the code automatically declare it as a “var”?? Thanks!

    • @Dani_Krossing
      @Dani_Krossing  2 года назад

      I explained it at that exact time stamp hehe. 🙂 Yes it did get declared automatically, and I explain further in a later video. If you wanna find that video, it’s the one about “hoisting”.

  • @_Omni
    @_Omni 6 лет назад +1

    💪

  • @AtticusKao
    @AtticusKao 4 года назад +1

    Gosh damn your taskbar is messed up ermagherd

  • @Danskiiify
    @Danskiiify 4 года назад

    I just finished writing this guide to JavaScript variables for beginners. You might find it helpful: www.danielpuiatti.com/getting-started-with-javascript-variables/

  • @DanielCardenas23
    @DanielCardenas23 6 лет назад

    I swear I feel like I'm learning visual logic again.

  • @braker37
    @braker37 5 лет назад

    The code I write within the "script" tag doesn't get colored. Any idea why that is?

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

    Guys am new to JavaScript but aren’t we supposed to be working everything in a JavaScript file like we did to html??? I mean shouldn’t we create something like index.is then work in it???

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

      Yes 🙂 I also get to that a few episodes later I believe

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

      @@Dani_Krossing thank you

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

    hi Dani

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

    You don't need variables in javascript, everything works just fine without them.

  • @utchutch
    @utchutch 5 лет назад

    I NEED HELP!!!!
    Am a new learner in programming and web development....Please y’all, i need a study partner, cause I don’t I understand some things. Whoever can help, let me know. Thanks 🙏🏼

  • @balazsmiskey6362
    @balazsmiskey6362 2 года назад

    he sounds like brackeys

  • @Hyper_Futbuss
    @Hyper_Futbuss 3 месяца назад

    Whats ur name?

  • @inayathkhan100
    @inayathkhan100 4 года назад

    Talking more teaching less, More theory less practical

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

    I Would never buy anything that is promoted on youtube especially something that disturbs my video!