ReferenceError: checkGuess is not defined [duplicate]

  function, javascript, referenceerror

The console does not detect any function.

I have this code.

function checkGuess() {
  alert('I am a placeholder');
}

When I open the console and try to run it, the console returns:

Uncaught ReferenceError: checkGuess is not defined
    at <anonymous>:1:1

What could be happening? Try Firefox and Chrome, and the same thing happens.

Source: Ask Javascript Questions

LEAVE A COMMENT