p5.js | frameCount Variable
The frameCount variable in p5.js is used to hold the number of frames which are displayed since the program started. Inside setup() function the value is 0, after the first iteration of draw it is 1, etc.
Below program illustrates the frameCount Variable in p5.js:
Example: This example uses frameCount variable to display the frame count.