The height variable in p5.js is a system variable which stores the height of the drawing canvas. It sets the second parameter of createCanvas() function.
Below programs illustrate the height variable in p5.js:
Example 1: This example uses height variable to display the height of canvas.
Example 2: This example uses height variable to display the height of window.
- p5.js | width variable
- p5.js | displayWidth Variable
- p5.js | frameCount Variable
- p5.js | displayHeight Variable
- HTML| DOM Variable Object
- PHP | Unset Session Variable
- PHP | Check if a variable is a function
- How to declare a global variable in PHP?
- How to get cookies from curl into a variable in PHP ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.