why does the console return undefined on executing the log method?
I write console.log(7) and press enter. The log output appears as expected, however, the next line shows undefined. Why is this?
That is because the developer tools console executes the code first and shows the returned value then. It works the same...
thevishalsinghrawat.hashnode.dev1 min read
Saurabh Rawat
Your way of explaining is excellent. It is concise and straightforward, without unnecessary elaboration. Keep up the good work and best of luck to you!