Question
The following code contains one error. Look closely! What line is it on?
function main() {
move();
move();
turnRight();
putball();
move();
}
function turnRight() {
turnLeft();
turnLeft();
turnLeft();
}
main();
JavaScript
- line 3
- line 4
- line 5
- line 9
function main() {
move();
move();
turnRight();
putball();
move();
}
function turnRight() {
turnLeft();
turnLeft();
turnLeft();
}
main();
JavaScript
- line 3
- line 4
- line 5
- line 9
Answers
There are no human answers yet.
Answered by
GPT-4o mini
The error is on **line 4**. The function `putball();` should be `putBall();` (assuming a standard convention where function names use camelCase). The error stems from the incorrect casing of the function name.
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.