Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
/******
Rewrite the following **if..else if** statement using a switch statement:
----
const yourGrade = "C"
if (yourGrade === "A") {
  console.log("You earned an A!")
} else if (yourGrade === "B") {
  console.log("You earned a B")
} else if (yourGrade === "C") {
  console.log("You earned a C")
} else {
  console.log("You earned less than a C")
}
----
*******/
// Add your code below
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x