MASTERING MATH OPERATORS!!! - JavaScript Tutorial for KIDS! - Ep. 2
Skills:
Text Coding for Kids90%
Key Takeaways
This video tutorial covers the basics of mathematical operators in JavaScript for kids, including addition, subtraction, division, multiplication, and modulo, using Firefox developer tools to demonstrate the calculations.
Full Transcript
[Music] hello again everybody this is not Java kid with another JavaScript for kids video today in this JavaScript video we'll be using Firefox developer tools to get a deeper understanding of the provided mathematical operators in JavaScript so let's jump right into it anyways um over here we have Firefox we're going to left click or no right click sorry right click go to inspect element open up this stock right here go to console we're be using that later and after that just go to scratch friend here I have it on the top so I won't present um anyways so on to the stuff we will be learning fine mathematical operators today and those operators are going to be addition subtraction division multiplication and an operator called modulo so let's get right into the first operation addition so let's just do a simple calculation right here it's going to be called two plus two and we are going to use this display button right here because it displays on the answer of this or any calculation on the JavaScript right here because obviously we are not going to do it up here so let's test that out if we press run it will not pop up here but it is actually behind the scenes JavaScript is calculating this equation so um unfortunately we're not going to use alert in this episode because just displays just something easier to you so we're just going to test display and this answer will pop up and of course that is 4 so 2 + 2 e the equation um not that hard I mean of course javascript is a powerhouse for compiling large amounts of data and a simple addition problem is not that hard for it to calculate so um in the same manner we would calculate 2 - 2 by using the subtraction symbol displayed of course it's 0 and now we're going to go on to the more complicated and um sort of more efficient more useable operators which are division and multiplication I use these two a lot in my code and you will find out later as we progressed on to more videos so let's go to not 22 2 divided by 2 let's first run I mean side display and of course wait 2 divided by 2 isn't one ah and if you've are to the next one it's going to be multiplication and this actually let me talk about something from before um 2 divided by 2 as you can see I'm using the forward slash this might not be something you see in when you're regularly dividing division you see that line with the two circles on the top and bottom but in JavaScript we are going to use the forward slash and that is what you are going to use to divide so let's get on to the next one which is going to be multiplication 2 3 well okay so we're going to move on to multiplication and multiplication the multiplication symbol might not be a something you see normally too and it's going to be this and an asterisk isn't mainly what you would see when you multiply two things together but in JavaScript of course um it's different and in main in many closed coding languages it's going to be different when you use multiplication and division it's going to be the same as we just showed you right here I mean I just showed you not we not part of the one or something they're all choices and okay don't last operator modulo um this might be a bit confusing so I'm going to use a different calculation oh wait we didn't calculate okay to multiply right you press display right here and that's before okay anyways okay we're going to use modulo right here um modulo is a bit complicated but trust me it will be easy once you get it so we're going to use something a bit more odd so let's do 13 will say divided by 3 I mean modulo 3 sorry uh so modulo um if you have ever been in a maybe like third grade or fourth grade when you have done division of course you would use remainders so our remainder is what's left over of your calculation after use division so let's say 6 divided by 4 4 goes into 6 one time and your remainder is 2 so um 13 up into what were you going to say let's just put 413 modulo 4 you can just guess this right here modulo is basically going to show up the remainder of this equation so guessing right here and hopefully you're right it is one guys so of course 4 goes into 13 3 times that equals 12 12 plus 1 is 13 so the remainder is going to be 1 so that's when logic Oh does it's a bit complicated but once you get it it will be super useful in any of your JavaScript um codes if you have like long amounts of code or if you're just trying to just basically useful in any code so I hope you guys did enjoy this video today if you did please leave a big fat thumbs up or small and if you want to - anytime super well and if you liked this video and one with insurance but we do subscribe to my channel grow and a lower of JavaScript Christians video and always of course keep the next one [Music]
More on: Text Coding for Kids
View skill →Related Reads
📰
📰
📰
📰
Best platform for teaching young kids to code for free
Reddit r/learnprogramming
12 Scratch Project Ideas for Students to Learn Coding the Fun Way
Dev.to · Danieldsouza
Why Building a Virtual Pet Game in Scratch Is the Perfect Coding Project for Kids
Medium · Programming
Scratch for kids
Reddit r/learnprogramming
🎓
Tutor Explanation
DeepCamp AI