VOOZH about

URL: https://www.geeksforgeeks.org/javascript/p5-js-remove-function/

⇱ p5.js remove() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

p5.js remove() Function

Last Updated : 16 Aug, 2023
The remove() function is an inbuilt function which is used to remove the element and deregister all listeners. This function requires p5.dom library. So add the following line in the head section of the index.html file. Syntax:
remove()
Parameters: This function does not accepts any parameters. Below examples illustrate the remove() function in p5.js: Example 1: This example creates an element. Output: 👁 Image
Example 2: This example uses remove() function to remove the element.
Output: 👁 Image
Comment