Difference between console.log and return in javascript? [closed]

Actually there’s nothing in common between them.

return – returns execution to the caller with optional result

console.log() – logs out information in console.

Leave a Comment