The append() function in p5.js is used to add value at the end of a given array i.e, it increases the length of the original array by one.
Parameters: This function accepts two parameters as mentioned above and described below:
- Array: It is the original input array to which a new value to be added.
- Value: It is the value which to be added at the end of the Array.
Return Value: It returns the new appended array.
Below program illustrates the append() function in p5.js:
Example: This example uses append() function to add any value at the end of the input array.
- PHP | AppendIterator append() Function
- PHP | ArrayIterator append() Function
- PHP append one array to another
- jQuery | append() Method
- Node | URLSearchParams.append()
- How to append an element in two seconds using jQuery ?
- How to append Angular styles in footer ?
- How to get the function name inside a function in PHP ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.