课程: JavaScript Essential Training
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Challenge intro: Create a content factory - JavaScript教程
课程: JavaScript Essential Training
Challenge intro: Create a content factory
(upbeat music) - [Instructor] When you build websites and applications, you'll often use JavaScript to pull data from a source in the form of structured objects and then use the data within those objects to populate HTML to be displayed in the browser. This challenge lets you experiment with this scenario by creating a content factory function. In the answer code for the challenge here, you have a lot of stuff going on, so let's break it down from the top. First, we have a backpack constructor class that creates our backpack, and it also sets up this backpack age function that allows us to find out how old the backpack is. Then two backpacks are defined, one called everydayPack and one called frogPack, and down here, we have a constant with a backpack object array that contains the everydayPack object and the frogPack object. All of this creates the type of array structure that you normally encounter when you work…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
-
-
-
-
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 秒
-
-
-
-