Object Creation Summary

2 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$39.99
List Price:  $79.99
You save:  $40
€34.42
List Price:  €68.85
You save:  €34.42
£29.88
List Price:  £59.76
You save:  £29.88
CA$56.19
List Price:  CA$112.40
You save:  CA$56.20
A$61.63
List Price:  A$123.28
You save:  A$61.65
S$51.88
List Price:  S$103.77
You save:  S$51.89
HK$310.77
List Price:  HK$621.63
You save:  HK$310.85
CHF 31.77
List Price:  CHF 63.55
You save:  CHF 31.78
NOK kr402.08
List Price:  NOK kr804.27
You save:  NOK kr402.18
DKK kr257.08
List Price:  DKK kr514.23
You save:  DKK kr257.15
NZ$69.95
List Price:  NZ$139.92
You save:  NZ$69.97
د.إ146.87
List Price:  د.إ293.79
You save:  د.إ146.91
৳4,875.14
List Price:  ৳9,751.50
You save:  ৳4,876.36
₹3,518.11
List Price:  ₹7,037.11
You save:  ₹3,518.99
RM169.11
List Price:  RM338.27
You save:  RM169.16
₦58,698.12
List Price:  ₦117,410.92
You save:  ₦58,712.80
₨11,316.02
List Price:  ₨22,634.87
You save:  ₨11,318.85
฿1,310
List Price:  ฿2,620.34
You save:  ฿1,310.33
₺1,678.29
List Price:  ₺3,357
You save:  ₺1,678.71
B$215.25
List Price:  B$430.57
You save:  B$215.31
R692.26
List Price:  R1,384.70
You save:  R692.44
Лв67.28
List Price:  Лв134.58
You save:  Лв67.30
₩57,232.85
List Price:  ₩114,480.02
You save:  ₩57,247.16
₪131.60
List Price:  ₪263.23
You save:  ₪131.63
₱2,330.99
List Price:  ₱4,662.57
You save:  ₱2,331.57
¥6,075.56
List Price:  ¥12,152.65
You save:  ¥6,077.08
MX$736.51
List Price:  MX$1,473.21
You save:  MX$736.69
QR145.64
List Price:  QR291.33
You save:  QR145.68
P569.34
List Price:  P1,138.84
You save:  P569.49
KSh5,166.70
List Price:  KSh10,334.70
You save:  KSh5,168
E£1,902.40
List Price:  E£3,805.28
You save:  E£1,902.88
ብር5,998.45
List Price:  ብር11,998.40
You save:  ብር5,999.95
Kz36,470
List Price:  Kz72,949.12
You save:  Kz36,479.12
CLP$38,085.71
List Price:  CLP$76,180.95
You save:  CLP$38,095.23
CN¥284.71
List Price:  CN¥569.49
You save:  CN¥284.78
RD$2,535.99
List Price:  RD$5,072.61
You save:  RD$2,536.62
DA5,216.73
List Price:  DA10,434.77
You save:  DA5,218.04
FJ$91.81
List Price:  FJ$183.65
You save:  FJ$91.83
Q306.31
List Price:  Q612.71
You save:  Q306.39
GY$8,366.98
List Price:  GY$16,736.05
You save:  GY$8,369.07
ISK kr4,873.98
List Price:  ISK kr9,749.18
You save:  ISK kr4,875.20
DH367.66
List Price:  DH735.41
You save:  DH367.75
L679.06
List Price:  L1,358.30
You save:  L679.23
ден2,122.40
List Price:  ден4,245.33
You save:  ден2,122.93
MOP$320.23
List Price:  MOP$640.55
You save:  MOP$320.31
N$693.41
List Price:  N$1,386.99
You save:  N$693.58
C$1,471.67
List Price:  C$2,943.71
You save:  C$1,472.04
रु5,622.90
List Price:  रु11,247.21
You save:  रु5,624.31
S/135.05
List Price:  S/270.14
You save:  S/135.08
K170.61
List Price:  K341.26
You save:  K170.65
SAR149.97
List Price:  SAR299.99
You save:  SAR150.01
ZK904.84
List Price:  ZK1,809.92
You save:  ZK905.07
L174.98
List Price:  L350.01
You save:  L175.02
Kč837.08
List Price:  Kč1,674.37
You save:  Kč837.29
Ft13,400.07
List Price:  Ft26,803.51
You save:  Ft13,403.43
SEK kr376.44
List Price:  SEK kr752.98
You save:  SEK kr376.54
ARS$58,276.64
List Price:  ARS$116,567.85
You save:  ARS$58,291.21
Bs276.32
List Price:  Bs552.72
You save:  Bs276.39
COP$153,682.17
List Price:  COP$307,402.78
You save:  COP$153,720.60
₡20,101.91
List Price:  ₡40,208.85
You save:  ₡20,106.93
L1,050.87
List Price:  L2,102.01
You save:  L1,051.13
₲283,298.74
List Price:  ₲566,668.34
You save:  ₲283,369.59
$U1,595.06
List Price:  $U3,190.53
You save:  $U1,595.46
zł145.87
List Price:  zł291.77
You save:  zł145.90
Already have an account? Log In

Transcript

So now we have five methods to create objects in JavaScript. But which one would you recommend? Well, the answer is so simple. Each one of these methods has broad and cons. However, in general, I would recommend using the simple way of creating objects by creating a variable. And then using the curly braces notation, and list all your properties for that object.

And whenever you want to add more properties, feel free to do so you can do so because it's so simple in JavaScript. But if you are going to create complicated applications, you will be forced to use either the constructor function or the factory function, because in that case, you will need to create many objects of the same function. So it's important to know this concept that in complicated applications, you will you are going to create many Many objects have the same function you so you just create one function. And then whenever you want to create objects, you will be able to do so. But if you are using simple applications, you only need to create one object and you are not going to create many objects. And I want I also want to warn you that always, always stick with one method, and don't just overwhelm yourself with many methods because you will get confused just use one method and always always use it because if you use many, many methods, you will get confused and you will not master all of them you you need just to pick one of these methods.

Pick one for the for simple applications and wonderful for complicated applications. And just use them over and over again. And with time, as time goes by, you will be able to master these methods

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.