Hi Kiran,
It's impossible to say what you've done wrong without knowing the way you integrated the JavaScript into your code. However, afaik it's impossible to get an error on a single line of an object initialization, so I'm tempted to think there's something else going on.