JavaScript for Beginners #46 Object Constructor Functions

preview_player
Показать описание
Here, we will learn about constructor functions in JavaScript. These allow us to make new instances of an object based on a blueprint.

0:00 Using the date object new Date()
1:05 Using methods from the date object
1:45 Setting up an object for a student
2:55 Setting up a constructor function
3:33 Return value of undefined from a function
3:48 Using the keyword new
4:18 What does the keyword new do
4:58 Setting up properties with the this keyword
7:37 Viewing the new object
7:48 Class conversion in VS code
8:33 Adding additional objects
9:49 Changing up properties
10:49 Adding in a fullName method
12:11 Adding in an getMyGrade method
19:00 Setting up another example

MDN Constructor:

W3 Schools Constructors:

JavaScript Playlist:

Node JS:

Visual Studio Code:
Рекомендации по теме
Комментарии
Автор

very helpful video, you deserve million subs

umoooo
Автор

nice videos, sorry that youtube didn't promote u. this comment for the youtube algo..

crystalcacik
Автор

Is it mandatory to make the parameters passed to the object member variables? In your example where you calculated the average grade you passed in the scores array and then you made it a member variable -> this.scores = scores. Btw, this video has answered my question from the previous one ;)

laponiec
visit shbcf.ru