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
Which of the programs below will create the following on the canvas:
createRing(); function createRing() { createCircle(50, "black"); createCircle(30, "white"); } function createCircle(radius, color) { let circle = new Circle(radius); circle.setPosition(200, 200); circle.setColor(color); add(circle); }
createRing(); function createRing() { createCircle("black", 50); createCircle("white", 30); } function createCircle(radius, color) { let circle = new Circle(radius); circle.setPosition(200, 200); circle.setColor(color); add(circle); }
createRing(); function createRing() { createCircle(30, "white"); createCircle(50, "black"); } function createCircle(radius, color) { let circle = new Circle(radius); circle.setPosition(200, 200); circle.setColor(color); add(circle); }
Each of the programs above will result in the correct graphic output.