paint-brush
How To Use The Spread Operator on a Functionby@anirudh-eka
362 reads
362 reads

How To Use The Spread Operator on a Function

by Anirudh Eka3mJanuary 15th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

You can’t officially do it, but you can write a function that does virtually the same thing. When I call a function with an input when another function returned undefined for that same input, I can spread a function for any number of objects. If we want to spread more than two functions we can modify spread to take a list of functions. Lazy evaluation allows us to wrap objects in functions for the benefit of lazy evaluation without sacrificing the ability to spread. With our function spread, we can avoid creating a new object.

Coin Mentioned

Mention Thumbnail
featured image - How To Use The Spread Operator on a Function
Anirudh Eka HackerNoon profile picture
Anirudh Eka

Anirudh Eka

@anirudh-eka

Passionate about finding patterns in computers, society and minds.

Learn More
LEARN MORE ABOUT @ANIRUDH-EKA'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Anirudh Eka HackerNoon profile picture
Anirudh Eka@anirudh-eka
Passionate about finding patterns in computers, society and minds.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite