课程: JavaScript Essential Training
今天就学习课程吧!
今天就开通帐号,24,600 门业界名师课程任您挑!
Practice: Build a new object with a constructor - JavaScript教程
课程: JavaScript Essential Training
Practice: Build a new object with a constructor
- Classes feature heavily in modern JavaScript frameworks and getting comfortable with writing and using them will be a huge asset to you as you started working with advanced JavaScript sites and applications. To help you solidify your understanding of classes right away here's a practice assignment for you. In the practice files you'll find the backpack class we've been working with so far. Using this class as a reference, I want you to create new classes based on one or more of the objects you created in the previous practice sessions. I recommend creating separate files for each class and importing them as modules so you have a clear separation of concerns. The easiest approach to building a new class is to start with a fully built out object and then migrate the properties and methods over one by one. Then once the class is complete, you can test it by recreating the original object using that class. Build several…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
Objects: A practical introduction4 分钟 53 秒
-
(已锁定)
JavaScript objects: The code version2 分钟 57 秒
-
(已锁定)
Object containers2 分钟 22 秒
-
(已锁定)
Object properties55 秒
-
(已锁定)
Accessing objects2 分钟 32 秒
-
(已锁定)
Accessing object properties5 分钟 35 秒
-
(已锁定)
Practice: Build a new object1 分钟 18 秒
-
(已锁定)
Object methods6 分钟 29 秒
-
(已锁定)
Practice: Build a new method56 秒
-
(已锁定)
Classes: Object blueprints6 分钟 35 秒
-
(已锁定)
Object constructors2 分钟 21 秒
-
(已锁定)
Practice: Build a new object with a constructor1 分钟 13 秒
-
(已锁定)
Global objects7 分钟 47 秒
-
(已锁定)
Challenge intro: Create a new object type2 分钟 5 秒
-
(已锁定)
Solution: Create a new object type3 分钟 16 秒
-
-
-
-
-
-
-
-
-