- script.js
JavaScript
var score;
Result
Goalscompleted
Write the main program loop with muffin.getScore().
- Set variable
scorethe value from commandmuffin.getScore(). - Add loop
while (score > -1) { }under the variable. “Timeout error” might be logged on this and the next step. This is normal. - Inside the loop, log the variable
scorein the console. - In the same place, after logging the variable in the console, once again set the variable
scorethe value from themuffin.getScore()command.
Comments