Meaning of '{ }' in javascript

后端 未结 7 699
余生分开走
余生分开走 2021-02-07 17:37

What does assigning a variable to {}, mean? Is that initializing it to a function? I have code in a javascript file that says this

GLGE.Wavefront =          


        
7条回答
  •  孤街浪徒
    2021-02-07 18:19

    It's JON (Javascript Object Notation) for creating a new empty object. Almost equal in idea to how you'd normally do Object x = new Object() in java, minus the initialization part...

提交回复
热议问题