How To Use The Spread Operator on a Functionby@anirudh-eka
348 reads

How To Use The Spread Operator on a Function

tldt arrow
Read on Terminal Reader🖨️

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

Learn More
LEARN MORE ABOUT @ANIRUDH-EKA'S EXPERTISE AND PLACE ON THE INTERNET.
react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa