Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

JavaScript Question of the Day Jan. 23, 2025

  1. Incorrect Correct No Answer was selected Invalid Answer

    The following program will result in an error 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();
    JavaScript

    Choose the option below that will result in this canvas output: