開発環境
- OS X Mavericks - Apple(OS)
- Safari, Firefox + Firebug, Google Chrome(Webプラウザ、プラグイン)
- BBEdit - Bare Bones Software, Inc. (GUI) , Emacs (CUI) (Text Editor)
- JavaScript (プログラミング言語)
Head First JavaScript Programming (Eric T. Freeman (著)、 Elisabeth Robson (著)、 O'Reilly Media )のChapter 3(Introducing Functions: Getting functional)、SHARPEN YOUR PENCIL(p.86)、CODE MAGNETS(p.87)を解いてみる。
SHARPEN YOUR PENCIL(p.86)、CODE MAGNETS(p.87)
- juno says woof woof
- scottie says woof woof
- dino says woof woof
- fido says woof woof
- lady says woof woof
- bruno says WOOF WOOF
コード(BBEdit, Emacs)
var result = '',
whatShallIWear = function (temp) {
if (temp < 60) {
result += 'Wear a jacket\n';
} else if (temp < 70) {
result += 'Wear a sweater\n';
} else {
result += 'Wear t-shirt\n';
}
};
whatShallIWear(50);
whatShallIWear(80);
whatShallIWear(60);
print(result);
0 コメント:
コメントを投稿