课程: JavaScript Essential Training
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Math operators
- [Instructor] Computers are really good at computing as in doing math and in JavaScript, you'll often have to do math to convert or combine or subtract or multiply or divide values or do other things. For all of this we have standard arithmetic math operators. In the exercise files I've set up an example so we can play around with this. So you can see it here. We've set up some lets with different values. Let me just output those lets into the console so we can see what they are. And then we have this lets called results down here where we can do a math operation and the result is placed inside the result let and then we just output it. So right now we are doing an addition using the plus symbols. So we are taking the value of A plus the value of B the result is nine because it's five plus four. We can also do a subtraction by putting in a minus symbol. This gives us A minus B the result is one. If we want to do…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
-
-
Variables: Containers for everything2 分钟 31 秒
-
(已锁定)
Var3 分钟 15 秒
-
(已锁定)
Scope3 分钟 37 秒
-
(已锁定)
Let4 分钟 34 秒
-
(已锁定)
Const2 分钟 58 秒
-
(已锁定)
Data types3 分钟 7 秒
-
(已锁定)
Assignment vs. comparison4 分钟 35 秒
-
(已锁定)
Math operators6 分钟 13 秒
-
(已锁定)
Challenge intro: Calculate sales tax1 分钟 35 秒
-
(已锁定)
Solution: Calculate sales tax3 分钟 30 秒
-
-
-
-
-
-