"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.