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

  Рет қаралды 190,382

Dani Krossing

Dani Krossing

Күн бұрын

Пікірлер: 349
@maheejaman1625
@maheejaman1625 2 жыл бұрын
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 жыл бұрын
I am so blessed. I was really struggling to understand how to make HTML and Javascript interact. Thank you
@socratesbinos8633
@socratesbinos8633 4 жыл бұрын
same
@jennifermckeithen1498
@jennifermckeithen1498 5 жыл бұрын
Really enjoyed this! You do a great job explaining the concepts. I'm going to watch all of your JS tutorials now. :-)
@jtc9098
@jtc9098 Жыл бұрын
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...
@ionut.vidrighin
@ionut.vidrighin 4 жыл бұрын
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
@vueltalparaiso9061
@vueltalparaiso9061 4 жыл бұрын
6:25 //laughter=" how do i explain this to these idiots"
@f3-faithfitnessfinance
@f3-faithfitnessfinance 4 жыл бұрын
😂😂
@louzynerd129
@louzynerd129 4 жыл бұрын
lmfao
@jonathancarter2347
@jonathancarter2347 5 жыл бұрын
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!
@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.
@ColombusLeBus
@ColombusLeBus 3 жыл бұрын
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 !
@Veianya
@Veianya 4 жыл бұрын
I really appreciate how you carefully and thoroughly explain everything.
@lawrencemichael5571
@lawrencemichael5571 4 жыл бұрын
8:59 "Darn it! I just confused you even more." a few seconds later "So what we just did here was we did that"
@IG7799-c4u
@IG7799-c4u 3 жыл бұрын
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!
@brandongreene2178
@brandongreene2178 5 жыл бұрын
You explain things so clearly and easy, you're a great teacher. Thank you
@shubhamujjwal328
@shubhamujjwal328 2 жыл бұрын
It's satisfying. My calculator is working fine. Thanks.
@YOUTUBE_IS_WOKE
@YOUTUBE_IS_WOKE 4 жыл бұрын
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
@jacobsiegel9144
@jacobsiegel9144 4 жыл бұрын
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
@christopherweaver4755
@christopherweaver4755 5 жыл бұрын
One of the better explanations I've seen on this subject, and I've been looking for a few...days. Thanks man!
@codingwithkenny6492
@codingwithkenny6492 3 жыл бұрын
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!
@jeremyclark9697
@jeremyclark9697 5 жыл бұрын
I cannot express how helpful these tutorials are. Keep up the good work, 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!
@hackoffz
@hackoffz 2 жыл бұрын
Really convenient and detailed for a beginner like me, thanks a lot for that.
@LearningSimplified
@LearningSimplified 6 жыл бұрын
Great topic to discuss. wonderful presentation...
@marklogan8393
@marklogan8393 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
@codingtime3803
@codingtime3803 4 жыл бұрын
You are a great teacher. You explain things very clearly and easily. Thanks bro! Keep helping people with your great work
@ItsReezun
@ItsReezun 6 жыл бұрын
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
@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!
@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
@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!
@MrGambitttt
@MrGambitttt 4 жыл бұрын
You are an awesome person and an awesome teacher. Thanks so much for taking time to help people.
@junmojico5556
@junmojico5556 5 жыл бұрын
I like your voice and accent. It sounds so clear and easy to understand.
@rajuchowdhury146
@rajuchowdhury146 4 жыл бұрын
You are a great teacher. Very nice explanation.
@muhamedkaric4247
@muhamedkaric4247 6 жыл бұрын
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...
@senteria
@senteria 5 жыл бұрын
Cool video, for reference when you using calculations you should use strict equal to ===
@mexcalgt
@mexcalgt 4 жыл бұрын
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!
@techwithdanyal4798
@techwithdanyal4798 4 жыл бұрын
Dani your tutorials on JavaScript are awesome. keep it up.
@annm2855
@annm2855 5 жыл бұрын
I love ur channel sir, thanks a lot sir, God bless u. Dummies like me have been looking for this kind of channel
@jesinu
@jesinu 6 жыл бұрын
Hey, I had fun building this in CodePen and following along with you. On to the next one!
@katiebuntic1049
@katiebuntic1049 2 жыл бұрын
Thank you so much for all these videos!
@Whatnoww
@Whatnoww 5 жыл бұрын
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.
@rezarahman1782
@rezarahman1782 3 жыл бұрын
The most easiest way! Thanks. 😊
@adewaleayeseteminkan4201
@adewaleayeseteminkan4201 2 жыл бұрын
Excellent tutorial. Very helpful.
@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.
@therealblackmonolith
@therealblackmonolith 5 жыл бұрын
Really good tutorial. Brings together a bunch of topics and skills into an actual project. Better than Wes Bos imo!
@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!
@KyleWangG
@KyleWangG 4 жыл бұрын
Thank you for your easy to understand instructions!
@ttty3630
@ttty3630 4 жыл бұрын
I'm a new subscriber, and this was very beginner-friendly and useful! Thanks!
@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 !
@HiredShinobe
@HiredShinobe 4 жыл бұрын
OH My God, I did it! I am a wizard, Harry! Thanks Dani.
@陈瀚龙
@陈瀚龙 6 жыл бұрын
I got excited and just popped in on this video first. I thought var was done. Const. Let. ES6. Awesome.
@umerziyad4359
@umerziyad4359 5 жыл бұрын
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
@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
@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 .......
@adeolajoy6671
@adeolajoy6671 3 жыл бұрын
well done sir,i really enjoy your tutor and keep on the good work. Thank you so much
@teflonrozay1074
@teflonrozay1074 2 жыл бұрын
Fantastico! Your explanation is superb and you didn't rush it 👏👏👏
@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!
@badruzzaman1708
@badruzzaman1708 5 жыл бұрын
So lucid .. so conducive.
@jeangrey4404
@jeangrey4404 2 жыл бұрын
You are amazing, ur lessons are enjoyable sir
@princewillagoha2969
@princewillagoha2969 5 жыл бұрын
Instead of document.querySelector(#id).value , Can I still use, document.getElementById(“I’d”).value ?
@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?
@LucasMakesArt
@LucasMakesArt 3 жыл бұрын
Awesome tutorial!
@areebjawad3033
@areebjawad3033 3 жыл бұрын
I created a calculator using Android. Thanks Dani
@NiceChange
@NiceChange Жыл бұрын
Still very valuable..great work.
@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
@Xxxsorrow
@Xxxsorrow 4 жыл бұрын
Thank you, that was easier than expected!
@eatyourgarden
@eatyourgarden 6 жыл бұрын
I thumbs up before i even watch. Your a legend :)
@eatyourgarden
@eatyourgarden 6 жыл бұрын
thanks for explaining that dickhead
@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
@kingnotora
@kingnotora 3 жыл бұрын
awesome video, it make me want to learn more js
@crunckNATIon
@crunckNATIon 5 жыл бұрын
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.
@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
@EzeugwuChibunduDennis
@EzeugwuChibunduDennis 8 ай бұрын
Also, can you explain what the querySelector means and why we used it because I think there is another way it can still be done
@Dani_Krossing
@Dani_Krossing 8 ай бұрын
You can also select elements using something like getElementById(), however it’s much easier to use querySelector(). Situationally you might wanna use getElementById(), if you are writing a resource intensive script, since getElementById() is slightly faster… but it’s by a VERY small margin.
@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 😊
@benjibo9476
@benjibo9476 6 ай бұрын
love it!
@okechukwuumezurike2292
@okechukwuumezurike2292 Жыл бұрын
Thank you so much, I've been trying to work a similar project. But let me ask, what's the difference between "document.getElementById" and document.querySelector?
@Dani_Krossing
@Dani_Krossing Жыл бұрын
The difference is in how they grab the element. querySelector gets it based on the CSS selector, and getElementById gets it based on the ID attribute. 🙂 The MDN documentation says that querySelector is preferred, but you could also argue that if you wanna support some older browsers, then getElementById is better since it is supported by them. But honestly nowadays since querySelector is supported by all modern browsers, I would recommend just using querySelector, since it is MUCH more convenient, and can do more complex selections. 🙂
@webteacher9637
@webteacher9637 5 жыл бұрын
Here is code (HTML portion) value 1: value 2: operator: add sub multi divide calculator (java script portion ) function calc() { var a=parseInt(document.querySelector("#value1").value); var b=parseInt(document.querySelector("#value2").value); var op= document.querySelector("#operator").value; var calculate; if(op=="add") { calculate=a+b; } else if(op=="sub") { calculate=a-b; } else if(op=="multi") { calculate=a*b; } else if(op=="divide") { calculate=a/b; } document.querySelector("#result").innerHTML=calculate; }
@sol3cito33
@sol3cito33 4 жыл бұрын
Thank you for this one, great tutorial! I'm new to JS and I learned a lot of new things! Tusen takk! :-)
@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
@bhaskar6056
@bhaskar6056 4 жыл бұрын
Easier way.. Thanks for explain the code
@charlotte.upandaway
@charlotte.upandaway 4 жыл бұрын
This was great! Thank you so much!
@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 :)
@shahadsaleh2180
@shahadsaleh2180 5 жыл бұрын
Thank you , your explanation is very clear and nice . I just finished the frontend web development at Udemy , and I haven't built a responsive web yet , everytime I try to , I don't know from where I start :/ is this normal ?
@Breezbriznost
@Breezbriznost 5 жыл бұрын
When I try to make a web responsive I compare what I wrote in CSS and what it does and, apart from that, what I need to change in order to do a diferent thing. For example, if you have: a { display: flex; flex-direction: column } but you wanna change it to row when you have idk max-width: 800px you just change flex-direction to row and etc.
@lolafunchow
@lolafunchow 4 жыл бұрын
You saved my homework task
@syedharis3235
@syedharis3235 5 жыл бұрын
wonderful tutorial bro...please do some intermediate level javascript tutorials
@toobaadil6497
@toobaadil6497 5 жыл бұрын
wow.... this is really easy.... Thanks so much Daniel
@francoiscote5541
@francoiscote5541 3 жыл бұрын
thanks!! that was helpfull!
@levizard6094
@levizard6094 4 жыл бұрын
Thank you a lot, amazing lesson! I enjoyed it very much :)
@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!
@mynulislam4991
@mynulislam4991 4 жыл бұрын
I really like your video
@momonkha5846
@momonkha5846 5 жыл бұрын
good video, thanks
@TheScarum
@TheScarum 4 жыл бұрын
Great lesson as always!
@maedehjavadi5264
@maedehjavadi5264 3 жыл бұрын
thanks but you could use switchcase condition instead of if loops
@jakubklos3438
@jakubklos3438 6 жыл бұрын
Perfectly explained!! Thanks !!!
@codigoninja
@codigoninja 5 жыл бұрын
Oh thank you, this open my mind!
@DanielDomigos
@DanielDomigos 3 жыл бұрын
Thank you!
@iamsleepy
@iamsleepy 6 жыл бұрын
Awesome tutorial! Easy to follow :)
@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
@diegopedrosa4324
@diegopedrosa4324 2 жыл бұрын
Saved my life :)
@لالة_يامنة
@لالة_يامنة 5 жыл бұрын
can we replace if statement with switch case statement ?? that will be the same!!
@vladimirmikulic7860
@vladimirmikulic7860 5 жыл бұрын
Yes, dear, you can.
@nowae
@nowae 5 жыл бұрын
Could u also do it with an 'AddEventListener' or is that not the right way?
@cergeant485
@cergeant485 6 жыл бұрын
So clear and simple, thank you!
2 MAGIC SECRETS @denismagicshow @roman_magic
00:32
MasomkaMagic
Рет қаралды 32 МЛН
Family Love #funny #sigma
00:16
CRAZY GREAPA
Рет қаралды 41 МЛН
ROSÉ & Bruno Mars - APT. (Official Music Video)
02:54
ROSÉ
Рет қаралды 306 МЛН
Build this JS calculator in 15 minutes! 🖩
15:20
Bro Code
Рет қаралды 644 М.
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
THE ODIN PROJECT: FOUNDATIONS - CALCULATOR | PROJECT SOLUTION
35:20
Dors Coding School
Рет қаралды 10 М.
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
Prototypes in JavaScript
14:05
Sam Meech-Ward
Рет қаралды 2,6 М.
Create a simple calculator using HTML, CSS, JavaScript
13:35
JavaScript Academy
Рет қаралды 252 М.