タグ

ES6に関するs99e209のブックマーク (2)

  • ECMAScript 2015 Language Specification – ECMA-262 6th Edition

    Standard ECMA-262 6th Edition / June 2015 ECMAScript® 2015 Language Specification This is the HTML rendering of ECMA-262 6th Edition, The ECMAScript 2015 Language Specification. The PDF rendering of this document is located at https://ecma-international.org/wp-content/uploads/ECMA-262_6th_edition_june_2015.pdf. The PDF version is the definitive specification. Any discrepancies between this HTML ve

  • JavaScript中級TIPS - Qiita

    文字列リテラル HTMLを含む文字列を生成する際に便利なため、囲む時はシングルクォート'hoge'がよい セミコロン 末尾にセミコロンをつけなくても解釈してくれるが、バグを生む可能性があるのでセミコロンはつけるように習慣化する ES6のclass記法のメソッド末尾にはセミコロン不要 同値比較 基的に===をつかう。==だと寛容過ぎる解釈のため、バグを生むことがある。 短絡評価 hogeFuncの引数にtrue相当の値が入ってきた場合、 ||の右側は読まれない。 hogeFuncの引数にfalse相当の値が入ってきた場合、 (false, null, undefined, NaN, "", 0) ||の右側を読みにいく。 function hogeFunc(e){ e || console.log('piyo'); } hogeFunc(1); // 何も出力されない。もし短絡評価がなけれ

    JavaScript中級TIPS - Qiita
  • 1