LoginSignup
0
0

More than 3 years have passed since last update.

P5.js 日本語リファレンス(append)

Last updated at Posted at 2020-05-24

このページでは「P5.js 日本語リファレンス」 の append関数を説明します。

append()

説明文

注意: 非推奨

append() は非推奨であり、p5の将来のバージョンで削除される予定です。代わりに array.push(value) を使用してください。

配列の最後に値を追加します。配列の長さを1だけ拡張します。

構文

append(array, value)

パラメタ

  • array

    Array:追加する配列

  • value

    Any:配列に追加する値

戻り値

配列:追加された配列

function setup()  {
  let myArray = ['Mango', 'Apple', 'Papaya'];
  print(myArray); // ['Mango', 'Apple', 'Papaya']

  append(myArray, 'Peach');
  print(myArray); // ['Mango', 'Apple', 'Papaya', 'Peach']
}

著作権

p5.js was created by Lauren McCarthy and is developed by a community of collaborators, with support from the Processing Foundation and NYU ITP. Identity and graphic design by Jerel Johnson.

ライセンス

Creative Commons(CC BY-NC-SA 4.0) に従います。

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