I have been reading a bit about undefined
and just started wondering that we see undefined
when we declare a function in browser console.
Does calling a function always return a value? If we do not explicitly return
a value, then by default undefined
value is returned from a function.
That is to say, a function will always return a value. Always. Is that correct?
var aFunc = function(){
console.log( "aFunc ran." );
}
aFunc() === undefined // true