1. var aTest = new Array(); //替换为
    2. var aTest = [];
    3. var aTest = new Object; //替换为
    4. var aTest = {};
    5. var reg = new RegExp(); //替换为
    6. var reg = /../;
    1. // 如果要创建具有一些特性的一般对象,也可以使用字面量,如下:
    2. var oFruit = new Object;
    3. oFruit.color = "red";
    4. oFruit.name = "apple";
    5. //前面的代码可用对象字面量来改写成这样:
    6. var oFruit = { color: "red", name: "apple" };