From the course: JavaScript Essential Training
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Object properties - JavaScript Tutorial
From the course: JavaScript Essential Training
Object properties
- [Instructor] Properties are literally the properties of the object. They describe different aspects of the object. Object properties are defined using a colon separated name value pair, where the name can be any string and is placed on the left. And the value can be any string inside quotation marks or an integer or a floating point number or a Boolean value as a true or false or an array, or even another object, placed on the right. You control the property names. And in JS the standard states, a property name can only contain letters, digits, dollar signs, and underscores. If you add quotation marks or hyphens or other symbols the object will not function properly and JavaScript will crash because there'll be incorrect code inside the object definition. The rule of thumb here to make sure everything works properly is to simply use camel case for property names.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Objects: A practical introduction4m 53s
-
(Locked)
JavaScript objects: The code version2m 57s
-
(Locked)
Object containers2m 22s
-
(Locked)
Object properties55s
-
(Locked)
Accessing objects2m 32s
-
(Locked)
Accessing object properties5m 35s
-
(Locked)
Practice: Build a new object1m 18s
-
(Locked)
Object methods6m 29s
-
(Locked)
Practice: Build a new method56s
-
(Locked)
Classes: Object blueprints6m 35s
-
(Locked)
Object constructors2m 21s
-
(Locked)
Practice: Build a new object with a constructor1m 13s
-
(Locked)
Global objects7m 47s
-
(Locked)
Challenge intro: Create a new object type2m 5s
-
(Locked)
Solution: Create a new object type3m 16s
-
-
-
-
-
-
-
-
-