Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

JavaScript Question of the Day Jan. 22, 2025

  1. Incorrect Correct No Answer was selected Invalid Answer

    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();
    JavaScript