✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
A student writes this code to calculate the area of a rectangle and display it. The program runs, but nothing appears on the canvas. What is the bug?
function setup() { createCanvas(300, 300); background(0, 255, 0);}
function draw() { area(20, 5);}
function area(w, h) { let result = w * h;}