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

1 answer

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.