Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 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!";
};