開発環境
- 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 1(A Quick Dip into Javascript: Getting your feet wet)、BE THE BROWSER(p.14)を解いてみる。
BE THE BROWSER(p.14)
コード(BBEdit, Emacs)
// a var joke = 'JavaScript walked into a bar....', toldJoke = false, $punchline = 'Better watch out for those semi-colons.', percenttage = 20, result; if (toldJoke === true) { alert($punchline); } else { alert(joke); } // b var zip_code = 98104, joesFavoriteMovie = 'Forbidden Planet', movieTicket$ = 9; if (movieTicket$ >= 9) { alert('Too much!'); } else { alert("We're going to see " + joesFavoriteMovie); }
0 コメント:
コメントを投稿