What's the output?
function sayHi() {
return (() => 0)();
}
console.log(typeof sayHi());You missed this one before
The sayHi function returns the returned value of the immediately invoked function expression (IIFE). This function returned 0, which is type "number".
FYI: typeof can return the following list of values: undefined, boolean, number, bigint, string, symbol, function and object. Note that typeof null returns "object".
Question 34 · see the original (opens in a new tab)
or press Enter