title: Return false from a switch statement
body: <p>I have a switch statement with multiple cases in JavaScript. But in one of the cases, I do not want to proceed if a condition is false.</p>
  
  <p>How do I do this. </p>
  
  <p>Take for eg.:</p>
  
  <pre><code>switch (case) {
      case "1":
          // some code
          break;
      case "two":
          // some code
          break;
      case "III":
          if (!shouldProceed) {
            return false;
          }
          // tasks to be done for case III
          break;
      case "4": 
          // case 4 code
          break;
      default:
          // default tasks
          break;
      }
  </code></pre>
  
  <p>My task 3 is a switch case, but it is conditional.
  Is it safe to return false from a case in the above way. What can be a better approach for this?</p>