clear(predicate)
Clears all cells that match a given condition, setting their values to null.
Example
(move the mouse to clear all 🐉 from the current column; click to reset)
Syntax
clear(predicate)
Parameters
| Param | Description |
|---|---|
predicate |
Function: condition that determines which cells to clear. Receives { row, col, value } as input1 |
- The
valuefield may be of any type, including functions or objects. ↩
What this page's examples use
- p5.quadrille
drawQuadrillecreateQuadrillecellLengthmouseColclear- p5.js
createCanvasbackground
Names the analysis can prove are called, and the line each one is documented on. Local variables and members of an unknown receiver are left out.