pin JavaScript, a
function is not required to have a return statement
nif
no return, the function automatically returns the special value: undefined
nthus,
a JavaScript function has an output whether you specify it or not
n
preturn-less functions are useful for accomplishing some
task
nif
you want to print a long message multiple times, you can define a single function that writes the message then call it multiple
times.
nYou
might send a different message as the parameter each time.
pSee message_function.html