Illegal return statement?


#1

if (0 <= computerChoice <= 0.33) {
return"rock";
} else if (0.34 <= computerChoice <= 0.66) {
return"paper";
} else {
return"scissors";
};


#2

What does return do, when/where can it be used? Compare to your code


#3

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