Ask coding questions
The return statement doesn't print anything in the repl's console, while it does in my browser's console. So, what's wrong with the repl's console?
Check script.js, thanks!
return isn't supposed to print anything. You need to console.log the result, at least.
@barrycarter It should return (in the console) whatever has been returned through the code? no?
@abhiraj No. Your browser's console is equipped with debugging capabilities, which catch return statements. So console.log would work on both.
As @Vandesm14 notes, your browser may be configured to show the result of return() statements, but, in general, return doesn't print anything.
@barrycarter @Vandesm14 All right. Thanks.