Sort 29 Discussions, By:

Sorry, you do not have a permission to answer to this question.

  • pobyedo 9 years ago + 1 comment

    This was my solution: switch (num){

            case 1:
            console.log("ONE");
            break;
    
            case 2:
            console.log("TWO");
            break;
    
            case 3:
            console.log("Three");
            break;
    
            case 4:
            console.log("FOUR");
            break;
    
            case 5:
            console.log("FIVE");
            break;
    
            case 6:
            console.log("SIX");
            break;
    
            case 7:
            console.log("SEVEN");
            break;
    
            case 8:
            console.log("EIGHT");
            break;
    
            case 9:
            console.log("NINE");
            break;
    
    default:
        console.log("PLEASE TRY AGAIN");
    
            } 
    

    at a loss for why case 2 got an error :/

    Add Reply Preview cancel

    Sorry, you do not have a permission to answer to this question.

    • aldiduzha 9 years ago + 0 comments

      Case 3 is in lower-case characters.

      Add Reply Preview cancel

      Sorry, you do not have a permission to answer to this question.

    • gunbeykader 3 months ago + 0 comments

      var num;

      switch(num){ case 1 : console.log("ONE"); break; case 2: console.log("TWO"); break; case 3 : console.log("THREE"); break; case 4 : console.log("FOUR"); break; case 5: console.log("FIVE"); break; case 6 : console.log("SIX"); break; case 7 : console.log("SEVEN"); break; case 8: console.log("EIGHT"); break; case 9 : console.log("NINE"); break; default: console.log("PLEASE TRY AGAIN");

      }

      Add Reply Preview cancel

      Sorry, you do not have a permission to answer to this question.

      • patelaryan3377 7 months ago + 0 comments

        can't understand the question

        Add Reply Preview cancel

        Sorry, you do not have a permission to answer to this question.

        • manvendrasingh07 about a year ago + 0 comments

          // Assume the variable 'num' is provided by the code checker // You don't need to declare 'num', it is already declared and initialized

          switch (num) { case 1: console.log("ONE"); break; case 2: console.log("TWO"); break; case 3: console.log("THREE"); break; case 4: console.log("FOUR"); break; case 5: console.log("FIVE"); break; case 6: console.log("SIX"); break; case 7: console.log("SEVEN"); break; case 8: console.log("EIGHT"); break; case 9: console.log("NINE"); break; default: console.log("PLEASE TRY AGAIN"); }

          Try this !

          Add Reply Preview cancel

          Sorry, you do not have a permission to answer to this question.

          • maheshsahoo1798 about a year ago + 0 comments

            switch (num){ case 1: console.log("one"); break; } case 2: console.log("two"); break; }case 3: console.log("three"); break; }case 4: console.log("four"); break; }case 5: console.log("five"); break; }case 6: console.log("six"); break; }case 7: console.log("seven"); break; }case 8: console.log("eight"); break; }case 9: console.log("nine"); break; } default: { console.log("please try again"); } }

            WHY IT SHOWING ERROR IN CASE 2?

            Add Reply Preview cancel

            Sorry, you do not have a permission to answer to this question.

            1. Challenge Walkthrough
              Let's walk through this sample challenge and explore the features of the code editor.1 of 6
            2. Review the problem statement
              Each challenge has a problem statement that includes sample inputs and outputs. Some challenges include additional information to help you out.2 of 6
            3. Choose a language
              Select the language you wish to use to solve this challenge.3 of 6
            4. Enter your code
              Code your solution in our custom editor or code in your own environment and upload your solution as a file.4 of 6
            5. Test your code
              You can compile your code and test it for errors and accuracy before submitting.5 of 6
            6. Submit to see results
              When you're ready, submit your solution! Remember, you can go back and refine your code anytime.6 of 6
            1. Check your score