Help Center
How to Read a ReferenceError is not defined
A ReferenceError appears when JavaScript uses a name that was never declared. In the preview at editor.clincoo.buzz open the console, copy the red name, then search for that name in the file the console cites.
Read the name and the line
A message such as menuToggle is not defined means the script calls menuToggle, but no var, let, const, or function with that name exists in the same scope. The line number points at the call, not always at the place the name should have been declared.
Check order and spelling
A script in the head with defer runs after HTML is parsed. A plain script in the head runs before the button exists, but the function name still has to be declared before it is called. One wrong letter, such as MenuToggle versus menuToggle, counts as a different name.
Do not hide the error
An empty catch without a log makes the page look frozen and drops the error. Print the error in the console, fix the declaration, then save and reload the preview. If you are still stuck, send the full error text to the assistant in app.clincoo.buzz.