Go Pro Sign Up Login

Buy Now and unlock this series

$

39

.99

$

24

.99

yours forever

Become a Pro and unlock everything

$

24

.99

per month

Immutable & Pure Functions

Downloads

Become a pro to download code and videos

Starting Code

Final Code

Comments

User avatar

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!