Explore what CodeHS has to offer for districts, schools, and teachers.
Click on one of our programs below to get started coding in the sandbox!
View All
What will be the output of the following program when run:
function main() { let planet = createCircle(50, 100, 100, "blue"); planet.setColor("orange"); } function createCircle(radius, x, y, color) { let circ = new Circle(radius); circ.setPosition(x, y); circ.setColor(color); add(circ); } main();
The canvas may look like one of the options above (A - C), but this program will result in an error when run.