先頭を削除し先頭を取得する var hoge = [1,2,3,4]; var piyo = hoge.shift(); //[2,3,4]; alert(piyo); //1 破壊的 ▲ ▼ 末尾を削除し末尾を取得する var hoge = [1,2,3,4]; var piyo = hoge.pop(); //[1,2,3] alert(piyo); //4 破壊的 ▲ ▼ 末尾に追加する var hoge = new Array(); hoge.push('aaa'); 破壊的 実はこのメソッド var hoge = []; hoge.push('aaa', 'bbb', 'ccc'); 引数を何個もとって連続で追加することができる。 ▲ ▼ 配列を結合する(破壊的) 「末尾に追加する」pushは引数を複数個とれるので、こいつを応用すると破壊的に配列を結合することができる var h
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く