Set Collection

3 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€84.46
List Price:  €118.25
You save:  €33.79
£73.27
List Price:  £102.58
You save:  £29.31
CA$137.74
List Price:  CA$192.84
You save:  CA$55.10
A$150.28
List Price:  A$210.40
You save:  A$60.11
S$127.86
List Price:  S$179.01
You save:  S$51.15
HK$777.68
List Price:  HK$1,088.79
You save:  HK$311.10
CHF 78.77
List Price:  CHF 110.28
You save:  CHF 31.51
NOK kr980.74
List Price:  NOK kr1,373.07
You save:  NOK kr392.33
DKK kr630.47
List Price:  DKK kr882.69
You save:  DKK kr252.21
NZ$169.27
List Price:  NZ$236.99
You save:  NZ$67.71
د.إ367.21
List Price:  د.إ514.11
You save:  د.إ146.90
৳12,185.31
List Price:  ৳17,059.92
You save:  ৳4,874.61
₹8,811.41
List Price:  ₹12,336.33
You save:  ₹3,524.92
RM419.55
List Price:  RM587.39
You save:  RM167.84
₦149,429.05
List Price:  ₦209,206.65
You save:  ₦59,777.60
₨28,401.48
List Price:  ₨39,763.21
You save:  ₨11,361.73
฿3,178.98
List Price:  ฿4,450.70
You save:  ฿1,271.72
₺4,131.33
List Price:  ₺5,784.03
You save:  ₺1,652.69
B$533.15
List Price:  B$746.44
You save:  B$213.28
R1,735.26
List Price:  R2,429.44
You save:  R694.17
Лв165.36
List Price:  Лв231.51
You save:  Лв66.15
₩138,526.83
List Price:  ₩193,943.10
You save:  ₩55,416.27
₪334.31
List Price:  ₪468.04
You save:  ₪133.73
₱5,702.16
List Price:  ₱7,983.25
You save:  ₱2,281.09
¥14,726.04
List Price:  ¥20,617.04
You save:  ¥5,891
MX$1,826.26
List Price:  MX$2,556.84
You save:  MX$730.57
QR365
List Price:  QR511.02
You save:  QR146.01
P1,418.71
List Price:  P1,986.26
You save:  P567.54
KSh12,913.70
List Price:  KSh18,079.70
You save:  KSh5,166
E£4,817.39
List Price:  E£6,744.55
You save:  E£1,927.15
ብር14,488.01
List Price:  ብር20,283.80
You save:  ብር5,795.78
Kz91,186.38
List Price:  Kz127,664.58
You save:  Kz36,478.20
CLP$95,246.47
List Price:  CLP$133,348.87
You save:  CLP$38,102.40
CN¥710.50
List Price:  CN¥994.74
You save:  CN¥284.23
RD$6,225.40
List Price:  RD$8,715.82
You save:  RD$2,490.41
DA12,927.13
List Price:  DA18,098.50
You save:  DA5,171.37
FJ$224
List Price:  FJ$313.61
You save:  FJ$89.61
Q766.66
List Price:  Q1,073.36
You save:  Q306.69
GY$20,938.51
List Price:  GY$29,314.75
You save:  GY$8,376.24
ISK kr12,061.79
List Price:  ISK kr16,886.99
You save:  ISK kr4,825.20
DH898.43
List Price:  DH1,257.84
You save:  DH359.41
L1,653.42
List Price:  L2,314.85
You save:  L661.43
ден5,203.15
List Price:  ден7,284.62
You save:  ден2,081.46
MOP$801.62
List Price:  MOP$1,122.31
You save:  MOP$320.68
N$1,740.46
List Price:  N$2,436.72
You save:  N$696.25
C$3,682.88
List Price:  C$5,156.18
You save:  C$1,473.30
रु14,057.89
List Price:  रु19,681.61
You save:  रु5,623.72
S/348.15
List Price:  S/487.43
You save:  S/139.27
K418.35
List Price:  K585.71
You save:  K167.35
SAR375.03
List Price:  SAR525.06
You save:  SAR150.02
ZK2,344.31
List Price:  ZK3,282.12
You save:  ZK937.81
L428.13
List Price:  L599.40
You save:  L171.27
Kč2,054.61
List Price:  Kč2,876.54
You save:  Kč821.93
Ft32,836.53
List Price:  Ft45,972.46
You save:  Ft13,135.92
SEK kr927.58
List Price:  SEK kr1,298.65
You save:  SEK kr371.07
ARS$147,359.02
List Price:  ARS$206,308.52
You save:  ARS$58,949.50
Bs691.58
List Price:  Bs968.24
You save:  Bs276.65
COP$386,929.40
List Price:  COP$541,716.65
You save:  COP$154,787.24
₡50,433.99
List Price:  ₡70,609.61
You save:  ₡20,175.61
L2,624.11
List Price:  L3,673.86
You save:  L1,049.75
₲714,143.32
List Price:  ₲999,829.21
You save:  ₲285,685.89
$U3,999.43
List Price:  $U5,599.36
You save:  $U1,599.93
zł359.58
List Price:  zł503.43
You save:  zł143.84
Already have an account? Log In

Transcript

Hello, in this JavaScript video, I am going to cover sets. So the set collection is an object that lets you safely store unique values of a talk whether its primitive values, or you know object references. Well, so you could have duplicates in there, but the way you access them encourages you not to have duplicate. Let me show you photo var equals new cert. I'm gonna name this too. And you can actually add value using the dot add method as well.

Bob's going to keep it simple, and just have square brackets here. So say 1234. That's enough to demonstrate what I'm trying to show you the console dot log. First of all on console, log out the entire set, you see 12345 For the console dot log s t, and we can, you know, let's say do.we cannot check if it has a particular value. So by for example, and I'll do a null, check if he has nine, which it doesn't have to remember what number it is true and false. So it does have five right here, but has nine doesn't have nine.

For change this to five, let's see how our results change. As you can see, they don't, and the set will only just store the value. So you know, that is a very, very important part of it. If you want to get a value, let's do console dot log. Log, I think you don't need to get a value because once you've confirmed that a value there, you can simply just, you know, get it. You can simply Just once you'll start looking at the value there, you know there therefore you can do whatever you want with it.

Let me show you how to sort of go over your entire set with the for loop before and next item of St. And if we do console dot log and printer Alton it prints out all the values but again, it doesn't print out that duplicate flight. So we will if What if I change this to a five as well, the set will just have one five and free because the reason he put us in that first instance of the fiber era. So that's set slipcase is basically like arrays but you have unique values. So if you need that functionality sets is the way to go. Any questions, feel free to follow me method and I look forward to seeing you in the next programming video.

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.