ReferenceError: Can't find variable: alert

I am doing the exercises, stacked with a simple error.
“ReferenceError: Can’t find variable: alert”

console.log() works
from the sandbox here
on freeCodeCamp, with “alert” I am getting the error above.

alert is a browser API, the challenge code is not actually running directly in the browser so you do not have access to the alert function.

You really shouldn’t use alert to debug code anyway. Use the console.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.