Question 4 of 10Pro Only
What is a pure function and what are the benefits of writing pure functions in backend development?
Sample answer preview
A pure function is a function that respects two fundamental criteria. First, it is deterministic: for the same inputs, it always returns the same result. Second, it has no side effects, meaning it does not modify external program state and does not depend on global variables.
deterministicside effecttestabilitymemoizationparallelization