case in javascript

JavaScript
switch(type) {
	case "SomeString":
		// Functionality
		break;
	case "OtherString":
		// Functionality
		break;
	default:
		// Functionality
		break;
}//javascript multiple case switch statement
var color = "yellow";
var darkOrLight="";
switch(color) {
    case "yellow":case "pink":case "orange":
        darkOrLight = "Light";
        break;
    case "blue":case "purple":case "brown":
        darkOrLight = "Dark";
        break;
    default:
        darkOrLight = "Unknown";
}

//darkOrLight="Light"switch(expression) {
  case x:
    // code block
    break;
  case y:
    // code block
    break;
  default:
    // code block
}switch(expression) {

  case x:

     // code block

        break;

  case y:

     // code block

     break;

  default:

      // code block

 }
 
Source

Also in JavaScript: