// You wrote:
const JokeBase = () => {
// ... body of function
}
console.log(JokeBase);
JokeBase();
JokeBase is the name of your function.
When you write the name of the function such as in the statement
console.log(JokeBase);
it doesn’t execute the function. It just prints that the JokeBase variable is pointing towards a function.
When you write the statement
JokeBase();
it executes the function (note the parentheses after the function name) and returns a value. But you aren’t doing anything with the returned value, so it just disappears without anything useful being shown.
Instead, you can print the returned value by doing:
// Instead of
console.log(JokeBase);
JokeBase();
// You can do
console.log(JokeBase());
// OR
// If you want to save the returned value, you
// can assign it to a variable before printing.
let result = JokeBase();
console.log(result);