0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

個人学習メモ#15 Arrayクラス

Last updated at Posted at 2018-08-06

Arrayクラスは、配列用のクラスです。

通常は0番地から順番にデータを格納し、どんなデータ型でも格納することができる。

var array = new Array(初期サイズ);

var array = new Array(1111);

var array = ["A","B","C","123",true];

空の配列を作成
var array = [];

配列の任意の番地にアクセスする
var sample = array[0];

console.log(sample); "A"

任意の番地に書き込み
array[2] = "S";

全ての番地にアクセス
var i;
var num = array.length;
for(i=0; i<num;i++){

}

削除する場合
delete array[1];

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?