JS Pure function
Twitter Youtube
https://youtu.be/AwE87kYdWtc
Two Rules
Given the same input, always return same output.
Produces no side effects
Use: Easy to refactor, makes code more flexible and adaptable.
Case 1
// Pure function.
const multiplyNumbers = (x,y) ...
vkglobal.hashnode.dev1 min read