There are some issues which are almost impossible to debug, but when you spot whats wrong, you feel incredibly stupid. This was one of those errors.

Got this error, when I copy-pasted javascript code from the <head> of an HTML document and spent close to half an hour figuring out what was wrong. So what was wrong? Well I forgot to strip the <script></script> tags from the Javascript that I copied!

  1. I was pulling my hair out for the past half hour and I couldn’t tell what was wrong with my script.

    Thanks mate.

  2. Oh man, thank you for posting this. I was in the exact same situation and it was driving me nuts. Worse yet, I’d actually deliberately _added_ the script markup to the js file, because it briefly looked like one browser I was developing for required them…

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

You May Also Like

Error While Parsing Json using Python – TypeError: list indices must be integers, not str

Jotting this down for fellow googlers. I recently started learning a bit…