Arrow & Lambda Functions

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
$99.99
List Price:  $139.99
You save:  $40
€85.01
List Price:  €119.02
You save:  €34
£74.08
List Price:  £103.71
You save:  £29.63
CA$138.06
List Price:  CA$193.28
You save:  CA$55.22
A$151.41
List Price:  A$211.98
You save:  A$60.57
S$128.39
List Price:  S$179.76
You save:  S$51.36
HK$777.55
List Price:  HK$1,088.60
You save:  HK$311.05
CHF 79.50
List Price:  CHF 111.31
You save:  CHF 31.80
NOK kr990.78
List Price:  NOK kr1,387.13
You save:  NOK kr396.35
DKK kr634.55
List Price:  DKK kr888.40
You save:  DKK kr253.84
NZ$170.19
List Price:  NZ$238.28
You save:  NZ$68.08
د.إ367.21
List Price:  د.إ514.11
You save:  د.إ146.90
৳12,174.73
List Price:  ৳17,045.11
You save:  ৳4,870.37
₹8,810.73
List Price:  ₹12,335.38
You save:  ₹3,524.64
RM420.65
List Price:  RM588.93
You save:  RM168.28
₦149,972
List Price:  ₦209,966.80
You save:  ₦59,994.80
₨28,291.87
List Price:  ₨39,609.76
You save:  ₨11,317.88
฿3,183.98
List Price:  ฿4,457.70
You save:  ฿1,273.72
₺4,138.49
List Price:  ₺5,794.06
You save:  ₺1,655.56
B$531.23
List Price:  B$743.75
You save:  B$212.51
R1,735.27
List Price:  R2,429.45
You save:  R694.17
Лв166.19
List Price:  Лв232.68
You save:  Лв66.48
₩139,621.31
List Price:  ₩195,475.43
You save:  ₩55,854.11
₪333.48
List Price:  ₪466.89
You save:  ₪133.40
₱5,712.52
List Price:  ₱7,997.76
You save:  ₱2,285.23
¥14,792.65
List Price:  ¥20,710.30
You save:  ¥5,917.65
MX$1,835.78
List Price:  MX$2,570.17
You save:  MX$734.38
QR366.82
List Price:  QR513.56
You save:  QR146.74
P1,430.96
List Price:  P2,003.40
You save:  P572.44
KSh12,952.70
List Price:  KSh18,134.30
You save:  KSh5,181.60
E£4,816.78
List Price:  E£6,743.69
You save:  E£1,926.90
ብር14,387.11
List Price:  ብር20,142.53
You save:  ብር5,755.42
Kz91,186.39
List Price:  Kz127,664.59
You save:  Kz36,478.20
CLP$95,570.44
List Price:  CLP$133,802.44
You save:  CLP$38,232
CN¥711.31
List Price:  CN¥995.87
You save:  CN¥284.55
RD$6,221.03
List Price:  RD$8,709.70
You save:  RD$2,488.66
DA12,950.21
List Price:  DA18,130.81
You save:  DA5,180.60
FJ$224.85
List Price:  FJ$314.80
You save:  FJ$89.95
Q766.29
List Price:  Q1,072.85
You save:  Q306.55
GY$20,926.15
List Price:  GY$29,297.44
You save:  GY$8,371.29
ISK kr12,156.78
List Price:  ISK kr17,019.98
You save:  ISK kr4,863.20
DH903.23
List Price:  DH1,264.56
You save:  DH361.32
L1,663.31
List Price:  L2,328.70
You save:  L665.39
ден5,229.59
List Price:  ден7,321.64
You save:  ден2,092.04
MOP$801.41
List Price:  MOP$1,122.01
You save:  MOP$320.59
N$1,743.36
List Price:  N$2,440.78
You save:  N$697.41
C$3,677.54
List Price:  C$5,148.70
You save:  C$1,471.16
रु14,094.94
List Price:  रु19,733.48
You save:  रु5,638.54
S/349.66
List Price:  S/489.54
You save:  S/139.87
K426.80
List Price:  K597.54
You save:  K170.74
SAR375
List Price:  SAR525.01
You save:  SAR150.01
ZK2,370.59
List Price:  ZK3,318.92
You save:  ZK948.33
L431.47
List Price:  L604.08
You save:  L172.60
Kč2,063.99
List Price:  Kč2,889.68
You save:  Kč825.68
Ft33,216.64
List Price:  Ft46,504.62
You save:  Ft13,287.98
SEK kr938.94
List Price:  SEK kr1,314.55
You save:  SEK kr375.61
ARS$147,416.76
List Price:  ARS$206,389.36
You save:  ARS$58,972.60
Bs691.25
List Price:  Bs967.78
You save:  Bs276.52
COP$390,251.14
List Price:  COP$546,367.20
You save:  COP$156,116.06
₡50,404.89
List Price:  ₡70,568.86
You save:  ₡20,163.97
L2,636.34
List Price:  L3,690.98
You save:  L1,054.64
₲716,255.91
List Price:  ₲1,002,786.92
You save:  ₲286,531.01
$U3,994.64
List Price:  $U5,592.65
You save:  $U1,598.01
zł362.46
List Price:  zł507.46
You save:  zł145
Already have an account? Log In

Transcript

Hello, in this video, I'm going to show you arrow functions, it's essentially a way of minimizing the code that you would have with an anonymous function like this anonymous functions or more EFI and arrow function, the more he is six. So instead of assigning to a variable like so, what you can do is actually get rid of the function keyword, and I think they know that it's a function, you still need the you know, the brackets here. And if you want parameters, you will say do X and Y so into parameter, but here, you put equals, and then greater than or the city said change back before save it and run it. It still runs the same way. You might a lot of the time. See it's shorthand like this and you'll usually be on on one line, something along the lines.

I prefer it prefer to separate it. So it looks more like a general regular function. But this is, you know, just a normal function as anything else. Also, as with a normal function and arrow functions, I recommend you then the const keyword, simply because this one showed that this can't be overridden. But if you want that functionality of being able to override this you know variable to have a function, you know, assigned to it, you can do so that's totally up to you, it's, you know, it's flexible. So you can choose what you want to do.

You have to bear in mind, arrow functions, you know, are not hoisted, so they must be defined before the use. And apart from that, that's all in our function is as an extra task, I want you to create an arrow function that you pass in two numbers, so two variables, two parameters, and you multiply them together and actually return that value and assign them a lead here to a variable, then print that out. So feel free to take Go take a look over the video again, if there's anything that you confused about, if you're still not sure, feel free to pop me a message and I look forward to seeing you in the next JavaScript 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.