Skip to content

Instantly share code, notes, and snippets.

@Elli-P
Created November 11, 2017 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Elli-P/cccaacfae68515c0cdab0e62aaa60538 to your computer and use it in GitHub Desktop.
Save Elli-P/cccaacfae68515c0cdab0e62aaa60538 to your computer and use it in GitHub Desktop.
/*
* Programming Quiz: Back to School (3-9)
*/
// change the value of `education` to test your code
var education = "an Associate's degree";
// set the value of this based on a person's education
var salary = "";
// your code goes here
switch (education) {
case "no high school diploma":
salary += "$25,636";
break;
case "a high school diploma":
salary += "$35,256";
break;
case "an Associate's degree":
salary += "$41,496";
break;
case "a Bachelor's degree":
salary += "$59,124";
break;
case "a Master's degree":
salary += "$69,732";
break;
case "a Professional degree":
salary += "$89,960";
break;
case "a Doctoral degree":
salary += "$84,396";
break;
}
console.log ("In 2015, a person with " + education + " earned an average of " + salary.toLocaleString("en-US") + "/year.");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment