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 append one array to another
- Node | URLSearchParams.append()
- jQuery | append() Method
- How to append an element in two seconds using jQuery ?
- How to get the function name inside a function in PHP ?
- PHP | Ds\Set first() Function
- D3.js | d3.min() function
- PHP | Ds\Set last() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.