Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Education-Salary
/* no high school diploma earned an average of $25,636/year, * a high school diploma earned an average of $35,256/year, * an associates degree earned an average of $41,496/year, * a Bachelor's degree earned an average of $59,124/year, * a Master's degree earned an average of $69,732/year, * a Professional degree earned an average of $89,960/year, * and a Doctoral degree earned an average of $84,396/year. * In 2015, a person with __________ earned an average of __________/year. */ var education = "a high school diploma "; switch (education) { case "no high school diploma ": salary=25636 break; case "a high school diploma ": salary=35256 break; case "an Associate's degree " : salary=41496 break; case "a Bachelor's degree " : salary=59124 break; case "a Master's degree " : salary=69732 break; case "a Professional degree ": salary=89960 break; case "a Doctoral degree " : salary=84396 break; // technically, not needed a break here. } print("In 2015, a person with "+education+" earned an average of $"+salary.toLocaleString("en-US")+"/year.")
run
|
edit
|
history
|
help
0
Jason's Code Challenge
game
WC
rstring
javascript check undefined
Javascript reverse string, one index
js object to json string
JS exam part 2 - Circumference
My Code1
JavaScript - Looping thru strings