Skip to content

Instantly share code, notes, and snippets.

@chikoski
Created November 8, 2012 03:25
Show Gist options
  • Save chikoski/4036483 to your computer and use it in GitHub Desktop.
Save chikoski/4036483 to your computer and use it in GitHub Desktop.
名簿データの作成と表示
var human = {
name: {familyName: "清水", firstName: "智公"},
age: 33,
sex: "male",
contact: {
twitter: "@chikoski",
github: "http://github.com/chikoski",
mail: "chiko@sfc.keio.ac.jp"
},
phone: ["123456789","234567891","345678912", "3456789124"]
};
document.write("性: " + human.name.familyName + "<br />");
document.write("名: " + human.name.firstName + "<br />");
document.write("年齢: " + human.age + "<br />");
document.write("性別: " + human.sex + "<br />");
document.write("Twitter ID:" + human.contact.twitter + "<br>");
document.write("メアド:" + human.contact.mail + "<br>");
i=0;
while(i < human.phone.length){
document.write("電話番号:" + human.phone[i] + "<br>");
i = i + 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment