Possible cases for Javascript error: “Expected identifier, string or number”

The cause of this type of error can often be a misplaced comma in an object or array definition:

var obj = {
   id: 23,
   name: "test",  <--
}

If it appears at a random line, maybe it’s part of an object defintion you are creating dynamically.

Leave a Comment