课程: JavaScript Essential Training
今天就学习课程吧!
今天就开通帐号,24,600 门业界名师课程任您挑!
Logical operators
- [Instructor] Conditional statements like this if, else statements rely on logical operators. We briefly talked about these earlier and now we can see them in action. A conditional statement is looking for a condition to either be met or not met, meaning we can use any expression that returns either true or false as the condition. In this example, I'm using the backpack age method which returns the number of days since the backpack was originally acquired and then I'm asking if the everyday backpack age is larger than or equal to 30, then we return backpack is used, otherwise we return backpack is new meaning the backpack is really under 30 days old. This is a good example of how conditional statements work. I can now change those to say, backpack age must be less than or equal to 30. Then of course I would have to change the logic here to say backpack is new at the top and then backpack is old at the bottom. If I want…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
-
-
-
-
The real-world function2 分钟 49 秒
-
(已锁定)
Functions and methods6 分钟 23 秒
-
(已锁定)
A standard function3 分钟 53 秒
-
(已锁定)
The arrow function4 分钟 49 秒
-
(已锁定)
Arrow functions and "this"4 分钟 20 秒
-
(已锁定)
Practice: Build a function1 分钟 31 秒
-
(已锁定)
Pass data to a function with parameters4 分钟 56 秒
-
(已锁定)
Return values from a function7 分钟 1 秒
-
(已锁定)
Practice: Pass values between functions2 分钟 33 秒
-
(已锁定)
Callbacks5 分钟 29 秒
-
(已锁定)
Conditional if...else statement5 分钟 52 秒
-
(已锁定)
Logical operators3 分钟 31 秒
-
(已锁定)
Conditional switch statement5 分钟 55 秒
-
(已锁定)
Looping through content5 分钟 19 秒
-
(已锁定)
Using the map() array method4 分钟 52 秒
-
(已锁定)
Challenge intro: Create a content factory2 分钟 36 秒
-
(已锁定)
Solution: Create a content factory5 分钟 21 秒
-
-
-
-