The script above is problematic. The function value of the variable shout is coded correctly however. This function "shout," creates a variable called "message" and gives it a string value of "HEY YOU". Then it alerts the string.
Since the function is an object value of message, the function is called using "shout()" outside the function itself. All is still good.
The problem happens in the last line. There is another alert which will trigger on page load. This second alert throws an error, because the alert is looking for something called message - on the global level. Even though a variable message is defined inside our shout function, it's not accessible by this second alert which is outside the scope of the function.