fill(predicate, value)
Fills cells matching a predicate condition with the specified value.
Example
(move the mouse to fill empty cells in the current row with 🐉; click to reset)
Syntax
fill(predicate, value)
Parameters
| Param | Description |
|---|---|
predicate |
Function: A predicate function ({ row, col, value }) => boolean selecting cells to fill |
value1 |
Any: A valid JavaScript value |
What this page's examples use
- p5.quadrille
drawQuadrillecreateQuadrillecellLengthmouseRowrandfill- p5.js
createCanvasbackgroundcolor
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.