Buy Now and unlock this series
$
39
.99
$
24
.99
yours forever
$
39
.99
$
24
.99
Become a Pro and unlock everything
$
24
.99
per month
$
24
.99
Immutable & Pure Functions
Downloads
Become a pro to download code and videos
Starting Code
Final Code
Better JavaScript
24 videos
Course Instructor
Scott Tolinski
- Functions
13M38S - Destructuring
16M46S - Named Parameters
10M29S - Naming Things
15M28S - Immutable & Pure Functions
16M55S - Benefits of Smaller Functions
12M42S - JS & The DOM + MDN Docs
17M36S - Interacting With The DOM
10M51S - JS & The DOM part 3
12M31S - Events addEventListener vs Event Methods
9M43S - setTimeout & setInterval
12M53S - What are promises?
13M59S - Async Await
11M33S - JS Array Methods & map
14M54S - Filter
12M4S - Reduce
6M19S - Other Array Methods
8M4S - This
10M27S - More This
6M3S - Classes
15M55S - So Fetch
11M27S - Async IIFE
8M18S - Modules, Import & Export
8M39S - Where To Go From Here
2M57S
Comments
Raul
over 1 year ago [edited]
@Antoine addMulti=(x, multi)=>x+multi is not the example given in this video. Both functions you have provided are pure because they will always return the same value given the same parameters, the only thing different is the naming of the function and the second parameter. Let me know if you need more clarification on this.
Antoine
over 1 year ago
But const addMulti=(x, multi)=>x+multi; is pure, it would be const add=(x,y)=>x+y, it always do the same thing, it adds the two arguments.
Want to join the conversation?
Become a Pro member today!