Skip to content

Instantly share code, notes, and snippets.

@omas
Last active August 29, 2015 14:03
Show Gist options
  • Save omas/2885f929fe03ba33b4ad to your computer and use it in GitHub Desktop.
Save omas/2885f929fe03ba33b4ad to your computer and use it in GitHub Desktop.
function HowOldAreYou(){
var messages = [
"あなたの名前を入力してください。"
,"あなたの年齢を入力してください。"
];
var name = prompt(messages[0]);
output(name + "さんこんにちは。");
var age = Number(prompt(messages[1]));
output("いま " + age + " 歳とすると、10年後は " + (age + 10) + " 歳ですね。");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment