Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4
I believe this is the reason: The function does not return anything, yet you are printing it. Hence, undefined. Perhaps try doing the following: var f= function(){ console.log("hello"); return "World!"; };
26th Jul 2017, 4:22 AM
Rrestoring faith
Rrestoring faith - avatar