JavaScript JavaScript Basics Working With Numbers The Mad Libs Challenge Revisited

jesus tercero
jesus tercero
2,564 Points

WHats THE POint what was the point of writing the 'questions left' after each 'questions' variable?

what was the point of writing the 'questions left' after each 'questions' variable?

2 Answers

Stephen Chamroeun
Stephen Chamroeun
4,911 Points

The main reason it's repeatedly typed out is because it's applying the new value of the variable questions each time a question is asked. If you didn't repeatedly type out questionsLeft, then you would have '3 questions left' on every single prompt.