Why am I getting the error `ReferenceError: _____ is not defined`?


#1

Question

Why am I getting the error ReferenceError: _____ is not defined?

Answer

The error usually means you’re trying to use a variable that hasn’t been defined yet. You’ll learn more about variables in the later lessons. For now, if you’re getting this error it is likely you were trying to use a string but forgot to put quotes around them, so add quotes around your string and that should be fixed. If the error still persists, double check your spelling of the full line the error seems to be coming from.