15: Exercises in JavaScript | Create a Calculator Using JavaScript | JavaScript Tutorial | mmtuts

Поділитися
Вставка
  • Опубліковано 29 жов 2024

КОМЕНТАРІ • 349

  • @maheejaman1625
    @maheejaman1625 2 роки тому +6

    This is in a true sense "GOLD" in my opinion ! This is just too wonderful! I just can't express how informative and also practical at the same time this single video is .
    THANK YOU SO MUCH, SIR.

  • @renan6827
    @renan6827 4 роки тому +35

    I am so blessed. I was really struggling to understand how to make HTML and Javascript interact. Thank you

  • @jtc9098
    @jtc9098 Рік тому +2

    I can't thank you enough for this tutorial! I have been struggling with running JS in HTML. Reading the console and figuring out where the error lies is definitely a life saver. Now I feel like there is hope. Thank you!

    • @motivationready
      @motivationready Рік тому

      Just keep at it. Remember: repetition is the mother of skill...

  • @jennifermckeithen1498
    @jennifermckeithen1498 5 років тому +24

    Really enjoyed this! You do a great job explaining the concepts. I'm going to watch all of your JS tutorials now. :-)

  • @ionut.vidrighin
    @ionut.vidrighin 4 роки тому +2

    Now this is indeed a beginner tutorial !
    Best I watched so far.
    I am no longer at that 'super scratch' beginner level but I remember when was the time and how much things frustrated me

  • @danielbarreto326
    @danielbarreto326 2 роки тому

    That's the thoughest lesson so far. But something that I just realize is that there's no time to cry with programmming language: just grab your energetic drink and .....man, I am exploding of new ideas..many thanks.

  • @jonathancarter2347
    @jonathancarter2347 5 років тому +1

    I appreciate how you explain things by starting with what you're going to do and use and by describing the connection between the code, what it does and what it allows the user to do. Nice!

  • @IG7799-c4u
    @IG7799-c4u 3 роки тому +1

    I did not learn about that query selector method during my JavaScript course. It seems like it's a much more elegant way of accessing elements based off their ID or name than using the "getElementById" or "getElementByName" methods. Thanks!

  • @ColombusLeBus
    @ColombusLeBus 3 роки тому +1

    Thank you king, I was struggling putting everything clear in my head, I knew how to make functions and stuff, It's just was unclear how to proceed and you made it very clear, you earned a sub !

  • @LearningSimplified
    @LearningSimplified 6 років тому +16

    Great topic to discuss. wonderful presentation...

  • @lawrencemichael5571
    @lawrencemichael5571 4 роки тому +15

    8:59
    "Darn it! I just confused you even more."
    a few seconds later
    "So what we just did here was we did that"

  • @Veianya
    @Veianya 4 роки тому

    I really appreciate how you carefully and thoroughly explain everything.

  • @jacobsiegel9144
    @jacobsiegel9144 4 роки тому +2

    I was able to successfully follow along with this video. I do plan on making a fancier version of a calculator and then using it in my portfolio and giving you credit

  • @vueltalparaiso9061
    @vueltalparaiso9061 4 роки тому +73

    6:25
    //laughter=" how do i explain this to these idiots"

  • @hackoffz
    @hackoffz 2 роки тому +1

    Really convenient and detailed for a beginner like me, thanks a lot for that.

  • @shubhamujjwal328
    @shubhamujjwal328 2 роки тому

    It's satisfying. My calculator is working fine. Thanks.

  • @codingwithkenny6492
    @codingwithkenny6492 3 роки тому +1

    I already knew how to build that calculator, but thanks for making the video and all of your hard work! I knew how to build it, but didn't think of building it until I saw this video which gave me the idea of coding that calculator myself!

  • @brandongreene2178
    @brandongreene2178 5 років тому +2

    You explain things so clearly and easy, you're a great teacher. Thank you

  • @YOUTUBE_IS_WOKE
    @YOUTUBE_IS_WOKE 4 роки тому +2

    Thanks for the way you teach patiently and well-detailed. keep it up! Hope to see if you have node.js tutorial. I'm skimming on your tutorials as I'm coming from a desktop programming background and have abandoned web for more than 10 years. I'm glad I found your channel.

    • @teflonrozay1074
      @teflonrozay1074 2 роки тому

      I doubt if someone will explain backend patiently like this

  • @ItsReezun
    @ItsReezun 5 років тому +3

    Update: If you do everything in the video and get an Undefined in the console.log this could be because of one simple error. The if statement from the video will check for a lowercase word in your HTML code. As shown below:
    if (op == "add") {
    calculate = a + b;
    } else if (op == "min") {
    calculate = a - b;
    } else if (op == "div") {
    calculate = a / b;
    } else if (op == "mul") {
    calculate = a * b;
    }
    Add
    Minus
    Divide
    Multiply
    if you keep your operation (op) javascript code as is make sure it is written the same way in your HTML code. For me, I changed my if statement to uppercase and typed out the whole word and this worked. My correction is shown below:
    if (op == "Add") {
    calculate = a + b;
    } else if (op == "Minus") {
    calculate = a - b;
    } else if (op == "Divide") {
    calculate = a / b;
    } else if (op == "Multiply") {
    calculate = a * b;
    }
    Add
    Minus
    Divide
    Multiply
    Hope this helped!
    #SCE #Stereocrate #stereocratentertainment #Reezun

  • @christopherweaver4755
    @christopherweaver4755 5 років тому +1

    One of the better explanations I've seen on this subject, and I've been looking for a few...days. Thanks man!

  • @eftiprwtopapadakis9310
    @eftiprwtopapadakis9310 4 роки тому

    Maybe the best turotial on Javascript where actually you learn to implement it with Html something that it's rare for these type of tutorials! Super useful knowledge that you can apply on your own projects later!

  • @kaleab27
    @kaleab27 4 роки тому

    I'm new here but I liked your content. it is simple and focused on its goal (you didn't go-to styling and all that kind of stuff as we are not here to learn about that).
    Thank you

  • @muhamedkaric4247
    @muhamedkaric4247 6 років тому +5

    you work great job! i hope you will make more more videos with more examples in short time, it's easy to you and mybe insignificant , but for us it very important :D... for example games, dinamicaly things in web-sites...

  • @rajuchowdhury146
    @rajuchowdhury146 4 роки тому

    You are a great teacher. Very nice explanation.

  • @jeremyclark9697
    @jeremyclark9697 5 років тому +1

    I cannot express how helpful these tutorials are. Keep up the good work, man!

  • @MrGambitttt
    @MrGambitttt 4 роки тому

    You are an awesome person and an awesome teacher. Thanks so much for taking time to help people.

  • @techwithdanyal4798
    @techwithdanyal4798 4 роки тому

    Dani your tutorials on JavaScript are awesome. keep it up.

  • @dema636
    @dema636 2 роки тому

    Very helpful! I thought it was gonna be extremely difficult but you explaining made it a lot more simple and made me realise I can already do it!

  • @junmojico5556
    @junmojico5556 5 років тому

    I like your voice and accent. It sounds so clear and easy to understand.

  • @jesinu
    @jesinu 6 років тому +2

    Hey, I had fun building this in CodePen and following along with you. On to the next one!

  • @senteria
    @senteria 5 років тому +1

    Cool video, for reference when you using calculations you should use strict equal to ===

  • @codingtime3803
    @codingtime3803 4 роки тому

    You are a great teacher. You explain things very clearly and easily. Thanks bro! Keep helping people with your great work

  • @adrianmurray1628
    @adrianmurray1628 3 роки тому

    Dude You are a god send! Than you so much, I've watched so many tutorials and different people explain Javascript but you do it so clearly while also making sure we understand how this interacts with our HTML. 10/10 subbed!

  • @ashoklakhwani2776
    @ashoklakhwani2776 3 роки тому

    Hey.... U explain very well....
    So thank you so much.... actually first I got some confusion regarding the previous videos...but it gotta clarified in this video...THANK YOU !

  • @TrueSebi_fan
    @TrueSebi_fan 3 місяці тому

    Wonderfull tutorial! I have learnt lots of things about PHP and JS from your channel. I am curious if you can you make a Node.js tutorial.

  • @teflonrozay1074
    @teflonrozay1074 2 роки тому

    Fantastico! Your explanation is superb and you didn't rush it 👏👏👏

  • @KyleWangG
    @KyleWangG 4 роки тому

    Thank you for your easy to understand instructions!

  • @HiredShinobe
    @HiredShinobe 4 роки тому

    OH My God, I did it! I am a wizard, Harry!
    Thanks Dani.

  • @bluerose2542
    @bluerose2542 2 роки тому

    Thank you 🙏😭
    It’s quite difficult to find beginner projects that explaining details.

    • @mamabear3610
      @mamabear3610 2 роки тому

      Not only that but the fonts are bold enough to be seen from a phone screen. That is awesome!

  • @adewaleayeseteminkan4201
    @adewaleayeseteminkan4201 2 роки тому

    Excellent tutorial. Very helpful.

  • @mexcalgt
    @mexcalgt 4 роки тому +1

    Dude seriously, I am not religious but I will pray for you and ask life to allow you all the success this life can give to a human being. Thanks for sharing your knowledge in such an amazing way!

  • @annm2855
    @annm2855 5 років тому +2

    I love ur channel sir, thanks a lot sir, God bless u. Dummies like me have been looking for this kind of channel

  • @adeolajoy6671
    @adeolajoy6671 3 роки тому

    well done sir,i really enjoy your tutor and keep on the good work. Thank you so much

  • @katiebuntic1049
    @katiebuntic1049 2 роки тому

    Thank you so much for all these videos!

  • @nashwanabdullah2234
    @nashwanabdullah2234 6 років тому

    you are amazing ! your voice so clear or simple , you are a best , you teacher , you my soul , you good , thank u thank u thank u .......

  • @NathanDodson
    @NathanDodson 2 роки тому

    This is quite helpful as one of the projects I have to do for my bootcamp is a basic calculator similar to this. However, they have a lot of extra stuff in their code templates that don't make any sense so I'm going through your JS videos to see if i can learn anything useful

  • @marklogan8393
    @marklogan8393 5 років тому +5

    Great tutorial. There's lots of info out there explaining variables, loops etc but not a huge amount of tutorials showing how to put it into practice. Keep up the good work

  • @rezarahman1782
    @rezarahman1782 3 роки тому

    The most easiest way! Thanks. 😊

  • @eclectusdrones7547
    @eclectusdrones7547 4 роки тому

    very informative, but for a beginner i found it too much information to take in but I did digest some of it. Also might I add, if you could create some exercise or a small project so all of the skills learnt can be put to use and improve the knowledge. Just a bit of feedback really.
    PS: Thank you for uploading this! building a simple game brought me here but now I am going through each episode so I can digest and practice. Youre super cool, thank you!

  • @陈瀚龙
    @陈瀚龙 6 років тому

    I got excited and just popped in on this video first. I thought var was done. Const. Let. ES6. Awesome.

  • @ttty3630
    @ttty3630 4 роки тому

    I'm a new subscriber, and this was very beginner-friendly and useful! Thanks!

  • @Whatnoww
    @Whatnoww 5 років тому +1

    Great video. Helped me out a lot. I'mma be watching the rest of the JS tutorial since it seems to be helping me more than my university course is.

  • @christastephensllc
    @christastephensllc 5 років тому

    This was a great video! It was perfectly paced and wasn't great for all levels! Thank you so much for this. I will be doing more of your projects.

  • @badruzzaman1708
    @badruzzaman1708 5 років тому

    So lucid .. so conducive.

  • @umerziyad4359
    @umerziyad4359 5 років тому +1

    If you want to get result on the main screen other than inner window then you can use this statement in your code document.getElementById("result").innerHTML = Answer; and make a div in HTML page as well :P

  • @jeangrey4404
    @jeangrey4404 2 роки тому

    You are amazing, ur lessons are enjoyable sir

  • @princewillagoha2969
    @princewillagoha2969 4 роки тому +1

    Instead of document.querySelector(#id).value ,
    Can I still use, document.getElementById(“I’d”).value ?

  • @calibr0636
    @calibr0636 5 років тому

    thanks man I put borders in my div box and centered the text, all in all, this is a very good video

  • @areebjawad3033
    @areebjawad3033 3 роки тому

    I created a calculator using Android. Thanks Dani

  • @MrFernandorrn
    @MrFernandorrn 5 років тому

    great video best of all explaining at the root of the problem, I saw divesos videos and yours was the best of all

  • @benjibo9476
    @benjibo9476 5 місяців тому +1

    love it!

  • @NiceChange
    @NiceChange Рік тому

    Still very valuable..great work.

  • @LucasMakesArt
    @LucasMakesArt 3 роки тому

    Awesome tutorial!

  • @crunckNATIon
    @crunckNATIon 5 років тому +1

    i think you should explain "concatenation"...maybe you wouldn't have to keep explaining that when you add to strings together it only puts them next to each other. but other than that i think very informative.

  • @kingnotora
    @kingnotora 3 роки тому

    awesome video, it make me want to learn more js

  • @Xxxsorrow
    @Xxxsorrow 4 роки тому

    Thank you, that was easier than expected!

  • @therealblackmonolith
    @therealblackmonolith 5 років тому +1

    Really good tutorial. Brings together a bunch of topics and skills into an actual project. Better than Wes Bos imo!

  • @poptic2414
    @poptic2414 2 роки тому

    Question, if you needed to declare the variables: a and b in the function as integers, as you did using parseInt, because the input type was "text," why not just change the input type to number? I would appreciate an answer to this! Great tutorial nonetheless

  • @toobaadil6497
    @toobaadil6497 5 років тому

    wow.... this is really easy.... Thanks so much Daniel

  • @tobyharnish8952
    @tobyharnish8952 4 роки тому

    So If you can explain what exactly parseInt() method is and how to use then I might have an idea.
    If you can do that video again I think I will understand javaScript more!

  • @eatyourgarden
    @eatyourgarden 6 років тому +1

    I thumbs up before i even watch. Your a legend :)

    • @eatyourgarden
      @eatyourgarden 6 років тому +1

      thanks for explaining that dickhead

  • @syedharis3235
    @syedharis3235 5 років тому

    wonderful tutorial bro...please do some intermediate level javascript tutorials

  • @arielkaplan810
    @arielkaplan810 3 роки тому

    this actually made me very confused because i though i missed a lot of metirial i love you but i am going to keep the practices to the end

  • @sol3cito33
    @sol3cito33 3 роки тому

    Thank you for this one, great tutorial! I'm new to JS and I learned a lot of new things! Tusen takk! :-)

  • @bhaskar6056
    @bhaskar6056 4 роки тому

    Easier way.. Thanks for explain the code

  • @jaythermo6937
    @jaythermo6937 3 роки тому +1

    17:02 kept getting a "Uncaught TypeError: document.querySelector(...) is null" so I used document.getElementById("result").innerHTML worked.

  • @TheScarum
    @TheScarum 4 роки тому

    Great lesson as always!

  • @charlotte.upandaway
    @charlotte.upandaway 4 роки тому

    This was great! Thank you so much!

  • @jakecooley7603
    @jakecooley7603 5 років тому

    Hey! Thank you so much! Quick question, Why do you do one if statement and the other 3 else if statements? Why not all if?

  • @mynulislam4991
    @mynulislam4991 4 роки тому

    I really like your video

  • @americanocoffee541
    @americanocoffee541 5 років тому

    Excellent !

  • @momonkha5846
    @momonkha5846 5 років тому

    good video, thanks

  • @cergeant485
    @cergeant485 6 років тому

    So clear and simple, thank you!

  • @iamsleepy
    @iamsleepy 6 років тому

    Awesome tutorial! Easy to follow :)

  • @jakubklos3438
    @jakubklos3438 6 років тому

    Perfectly explained!! Thanks !!!

  • @sathamhussain5319
    @sathamhussain5319 3 роки тому

    fantastic bro

  • @lolafunchow
    @lolafunchow 4 роки тому

    You saved my homework task

  • @levizard6094
    @levizard6094 4 роки тому

    Thank you a lot, amazing lesson! I enjoyed it very much :)

  • @sparshvohra9944
    @sparshvohra9944 5 років тому

    Which pc software should i use to practice this?? I am learning from grasshopper app and making flags as i am a beginner 😊

  • @edmonson8493
    @edmonson8493 5 років тому

    Excellent! Nice job.

  • @RundErr24
    @RundErr24 6 років тому

    What would happened if we set input type ="number" in our form? Would be output string as well? Thank you for your videos :)

  • @ufotofu9
    @ufotofu9 5 років тому

    Other than not being able to style as specifically, is there any side effect to have your text not inside of some element? I've never seen this before

  • @codigoninja
    @codigoninja 5 років тому +1

    Oh thank you, this open my mind!

  • @_https
    @_https 6 років тому +4

    Nice video, thanks!

  • @AhmedAli-lu8wg
    @AhmedAli-lu8wg 4 роки тому

    Can this be done using Switch Statements instead?
    I am trying to use different techniques to achieve the same result.

  • @maedehjavadi5264
    @maedehjavadi5264 3 роки тому

    thanks but you could use switchcase condition instead of if loops

  • @DanielDomigos
    @DanielDomigos 3 роки тому

    Thank you!

  • @francoiscote5541
    @francoiscote5541 3 роки тому

    thanks!! that was helpfull!

  • @akashjitnayak6947
    @akashjitnayak6947 6 років тому

    Awesome Explanation sir