Pure Functions in JavaScript

Kevin Luu
JavaScript in Plain English
2 min readMar 24, 2023

--

What are pure functions and why are they important

Photo by Camille Brodard on Unsplash

What are pure functions?

Pure function is a function that always returns the same output for a given set of inputs, and has no side effects that affect any part of the program beyond the function’s own scope. Pure functions are considered one of the fundamental building blocks of functional programming, and are…

--

--