Want to receive Question of the Day updates? Subscribe Here
JavaScript Question of the Day
Feb. 17, 2025
IncorrectCorrectNo Answer was selectedInvalid Answer
What would be the color of the circle object after the following program executes?
let circle;let blue ="#3458eb"functionmain(){
circle =drawCircle(100,getWidth()/2,getHeight()/2,"red");setTimer(animation,100);}functiondrawCircle(radius, x, y, color){
circle =newCircle(radius);
circle.setPosition(x, y);
circle.setColor(color);add(circle);return(circle);}functionanimation(){
circle.setColor(Randomizer.nextColor());
circle.move(0,-5);if(circle.getY()-100<=0){makeBlue();}if(circle.getColor()== blue){stopAnimation();}}functionmakeBlue(){
circle.setColor(blue);}functionstopAnimation(){stopTimer(animation);}main();