课程: JavaScript Essential Training
今天就学习课程吧!
今天就开通帐号,24,600 门业界名师课程任您挑!
Var
- [Instructor] In this chapter, we'll take a step back and look at some fundamentals of JavaScript including variables, data types, and various operators. For this purpose, have created the most basic of exercise files, a blank HTML document calling in a single JavaScript file. This gives us a good playground to experiment in the console. We'll start with variables. The classic variable container in JavaScript is simply called var, and it's defined with the var statement. You assign a value to a var by giving it first a name then using the assignment symbol, the equal symbol and then adding a value to it. In the console, I can create a new var by saying var, and then give it a name, container, and then use the equal symbol to assign a value to it. So I'll assign it to value of five. Now I can call in the container at any time and when I do, I get the value. So, five. So I can say container and the browser will…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
-
-
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 秒
-
-
-
-
-
-