Answers for "Multiple Identical Options in Switch Statements"

2

Multiple Identical Options in Switch Statements

function sequentialSizes(val) {
  var answer = "";
  
  switch(val) {
    case 1:
    case 2:
    case 3:
      answer = "Low";
      break;
    case 4:
    case 5:
    case 6:
      answer = "Mid";
      break;
    case 7:
    case 8:
    case 9:
      answer = "High";
      break;
  }

  return answer;
}
Posted by: Guest on July-18-2020

Code answers related to "Multiple Identical Options in Switch Statements"

Code answers related to "Javascript"

Browse Popular Code Answers by Language