Jump to content

Javascript/Đối tượng

From Wikiversity

Khai báo

[edit]
var myStructure = {
    name: [
        first: "Mel",
        last: "Smith"
    ],
    age: 33,
    hobbies: [ "chess", "jogging" ]
};

Thí dụ

[edit]
var myStructure = {
    name: [
        first: "Mel",
        last: "Smith"
    ],
    age: 33,
    hobbies: [ "chess", "jogging" ]
};