for of だけど、JavaScript にコンパイルしたら for in になるところがちょっと解せない。 でもオブジェクトにはof.... オブにはオブ、これで覚えた! for 後の変数の記述順 配列の場合、for のあとには value, index の順で書く。 オブジェクトの場合、for のあとには key, value の順で書く。 value が1番目にくるか 2番目にくるかが違うので混乱するが、これは2番目の変数が省略可能になっているのが理由なのかな?
for of だけど、JavaScript にコンパイルしたら for in になるところがちょっと解せない。 でもオブジェクトにはof.... オブにはオブ、これで覚えた! for 後の変数の記述順 配列の場合、for のあとには value, index の順で書く。 オブジェクトの場合、for のあとには key, value の順で書く。 value が1番目にくるか 2番目にくるかが違うので混乱するが、これは2番目の変数が省略可能になっているのが理由なのかな?
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く