The humor hiding behind “JavaScript error: Semicolon expected”

Raymond Chen

On occasion, I make a typo and get “JavaScript error: Semicolon expected” and I chuckle a little, because JavaScript was designed to make semicolons optional most of the time.

When I made this observation, some of my friends were amused because I included the phrase “JavaScript was designed.”

JavaScript was announced 25 years ago today. Happy birthday.

Bonus chatter: If you came here looking for an actual answer, here are some causes for the “Semicolon expected” error.


Discussion is closed. Login to edit/delete existing comments.

  • Peter Cooper Jr. 0

    Wow, JavaScript is old enough to run for congress now. (I guess it’d be hard to do a worse job than the other contenders 🙂 )

    And of course JavaScript was designed. As Eric Lippert says, it was designed to make the monkey dance when you move the mouse. Somehow it ended up being used for much more than that. (Kind of like Java, it was designed for the client-side but seems to be getting more popular on the server-side as it ages.)

    • Danstur 0

      The first prototype of JavaScript was done in ten (!) days with the whole first release taking a few months.

      The it turned out as well as it has shows Brendan Eich’s capabilities as an engineer. Imagine Rasmus Lerdorf being tasked with this an shudder in horror.

      That said it boggles my mind why anyone would want to use JavaScript on the server side given there are so many superior options around. I guess some people learn one language and then are stuck with it.

      • Roeland Schoukens 0

        It has also appeared on the desktop in the form of Electron, likely for the same reason. In effect these apps are copies of Chromium shipped with some content to display. This is easy to spot in Task manager, since modern browsers create a few processes. Eg. look for the multiple instances of Skype and Spotify.

Feedback usabilla icon