Skip to content

Instantly share code, notes, and snippets.

@suhailgupta03
Created May 10, 2023 15:17
Show Gist options
  • Save suhailgupta03/f6ac7ff4cd70273543608be798dd3d69 to your computer and use it in GitHub Desktop.
Save suhailgupta03/f6ac7ff4cd70273543608be798dd3d69 to your computer and use it in GitHub Desktop.
var y = 200; // Assign 200 to y
switch(y){ // switch is taking 'y' as a value
// to validate
case 200: // will check if y == 200
console.log("this is 200");
// I have not been asked to EXIT
// the SWITCH block YET!!!
// So, I'll move ahead with the next
// statement
case 300: // will check if y == 300
console.log("this is 300");
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment