Please Help Me With This SYNTAX!


#1

I HAVE MADE THIS


var amount = prompt("How many Crystal You Want?""Type only 1000,5000,8000")
switch(amount) {
    case '1000':
        console.log("OK DONE")
        break;
        case '5000':
        console.log("OK ONLY DONE FOR YOU!")
        break;
        case'8000':
        console.log("TOO BIG AMOUNT! IT WILL TAKE TIME!")
        break;
        default:
        console.log("You Can Add these Amount-1000,5000,8000")
        break;
}

WHAT IS WRONG?PLEASE TELL ME!


#2

On your first line remove the two "". Then also you forgot to end some of your line with ";". Correct this and try again.


#3

Thank You for your help :smile:


#4

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