2012年4月30日月曜日

開発環境

『初めてのJavaScript 第2版』(シェリー・パワーズ著(Shelley Powers著)、武舎 広幸+武舎 るみ訳、オライリー・ジャパン、2009年、ISBN978-4-84311-425-5) の2章(データ型と変数)練習問題1、3を解いてみる。

その他参考書籍

1.

識別子として有効なもの。

$someVariable
_someVariable
some_variable
somēvariabl

識別子として有効でないもの。

1Variable
先頭が数字
function
予約語
.someVariable
「.」は識別子に使えない。
some*variable
「*」は演算子

3.

問題の文字列リテラルは有効ではない。

書き換え。

コード(TextWrangler)

var someString = "Who once said, "+
                 "\"Only two things are infinite, " +
                 "the universe and human stupidity, " +
                 "and I'm not sure about the former.\"";
$('#pre0').html(someString);

  






						

0 コメント:

コメントを投稿