JavaScript exec returns Undefined

When ever you execute the JS command in NodeJS or Deno environment some of the functions have a return statement

Such as console.log function also returns something. If there is no return statement is cached then by default this statement outputs undefined after executing the statement in terminal

Source - StackOverFlow


Last updated