If I create a JSON object immediately before an anonymous function call, I get TypeError: ({x:0, y:0}) is not a function in Firefox, or Uncaught TypeError: {(intermediate value)(intermediate value)} is not a function in Chrome.
However, I never called a as a function. Also, when I put a semicolon after the object definition, this error does not occur.
According to http://inimino.org/~inimino/blog/javascript_semicolons I don't see why I would, in theory, need a semicolon there. However, for some reason it is still required. Why?
let a = { x: 0, y: 0 }
(() => {
console.log('test')
})()