Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

JavaScript Question of the Day Jan. 6, 2025

  1. Incorrect Correct No Answer was selected Invalid Answer

    The following function draws a rectangle on the canvas:

    function drawSquare(size, color) {
        let square = new Rectangle(size, size);
        square.setColor(color);
        square.setPosition(100, 100);
        add(square);
    }
    JavaScript

    What is the minimum number of arguments that must be used when calling the drawSquare() function?