Creation
There are two ways to create an object
in JavaScript:
literal
var object = {};
// Yes, simply a pair of curly braces!
Note: this is the recommended way.
and object-oriented
var object = new Object();
Note: it’s almost like Java.
本文档使用 Sou.st 构建