javascript - Setting object property to Array Literal throwing error -


i have simple line in js,

var = new {           aa: []        } 

but line throwing error in js.

typeerror: object not function 

any reason why?

new used instantiate object using constructor (which function, hence error message).

in case use

var = {       aa: [] } 

some references :


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -