Issue with the label syntax which jumping to the top of the code


I am trying add a label at the top of the code as below:
startAgain :
var userChoice …

I am using a siwtch case to jump to the specifed label if draw or incorrect input by user but codecademy is creating a problem with the label statement.


Please post:

exercise url
error mesasge


Exercise Rock Paper Scissor :

In the code for the condition when user is entering wrong input, I am displaying an error message and redirecting the program control back to the top of the code to start again with a fresh input.

But as soon as I am writing the label at the top it is showing label statement error.
My label name is startAgain
And I am writing “startAgain:” without quotes at the top of the code


That is the old learning environment, which is no longer supported. Please update to one of the supported courses:

You didn’t share your code, so its impossible to say. The exercise is just for me to get quick access to the lesson, it will load my own code (it checks for the user that is signed in)


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.