These are the two terms that you always hear in a programming language called Pure and Impure functions. You know Pure Function is always dependent on arguments and there should not be any side effects. What hack is Side Effects? ☠️ When you try to ...

Markdown supported · ⌘↵ to post
"As you all know that JavaScript is synchronous, using console or any callback or promise/fetch will make the function asynchronous."
Using console doesn't make the function asynchronous. It may likely make it technically impure though (although it doesn't affect the idempotency of the function either, so that's debatable). To be clear, a function that calls another function can still be a pure function.
iamGpower
Build stuff, break stuff, repeat...
Great writeup Suprabha Supi. 👍 I would also like to add that: