0
0

More than 1 year has passed since last update.

javascript 学び2

Posted at

●while
繰り返し
 while(条件式) { 繰り返す式 }

●for
繰り返し
 for(変数;条件;計算式) { console.log }

●配列
 const animals1 = "dog";
const animals2 = "cat" ; → const animals ["dog","cat","sheep"];
const animals2 = "sheep";
,で区切る
インデックス番号は0からの開始となるので注意!!

●length
要素数
 console.log(animals.length); 要素数を出力

●オブジェクト
 const item {プロパティ1:値1,プロパティ2:値1};
item.プロパティ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