I am wondering how to make direct calls to a function that does not have a return and call it via console.log.
I learned that functions without return have different control over console.log.
But I do not know what this means.
I have written the example code below and wonder about the output value and undefined.
test code
> var bark = function() { return 1; };
undefined
> bark();
1
> console.log(bark());
1
undefined
> var bark2 = function() { console.log('a'); };
undefined
> bark2()
a
undefined
> console.log(bark2());
a
undefined
undefined
>