How to create inline objects with properties?

后端 未结 9 726
误落风尘
误落风尘 2020-12-04 19:12

In Javascript it would be:

var newObject = { \'propertyName\' : \'propertyValue\' };
newObject.propertyName;  // retur         


        
9条回答
  •  我在风中等你
    2020-12-04 19:29

    obj = type('obj', (object,), {'propertyName' : 'propertyValue'})
    

    there are two kinds of type function uses.

提交回复
热议问题