• 2022-05-28
    下列方法中,能正确创建 JavaScript 对象的是( )。
    A: var txt = new Object[name:"George",price:25]
    B: var txt = new Object(name:"George",price:25)
    C: var txt = new Object{name:"George",price:25}
    D: var txt = new Object({name:"George",price:25})