Static p5_sys::global::append [−][src]
pub static append: AppendInternalType
Expand description
Adds a value to the end of an array. Extends the length of the array by one. Maps to Array.push().
Examples
function setup() { let myArray = ['Mango', 'Apple', 'Papaya']; print(myArray); // ['Mango', 'Apple', 'Papaya'] append(myArray, 'Peach'); print(myArray); // ['Mango', 'Apple', 'Papaya', 'Peach'] }
Parameters
array
Array to append
value
to be added to the Array