I'm trying to write a simple AI for a game in JavaScript. (The game is not mine.) Here is the extent of my code so far for the AI:

```
function AIManager(grid) {
  this.events = {};
  this.grid = grid;

  setInterval(new function(){console.log("hello")}, 1000);
}

```

When I try to run the game, the console outputs "hello" a single time followed by

```
Uncaught SyntaxError: Unexpected identifier

```

once per second, with no stack trace or line number attached to it. (When I set the interval to 1 ms instead of 1000 ms, this error printed every 1 ms, so it is definitely responding to the setInterval function.)

Could anyone help me understand why this is happening? I'm a bit of a javascript noob right now... Thanks!