Answers for "p5.js add item to array"

1

p5.js add item to array

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

  append(myArray, 'Peach');
  print(myArray); // ['Mango', 'Apple', 'Papaya', 'Peach']
}
Posted by: Guest on March-16-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language