MediaWiki:Switch.js

var day =2; switch (day) { case 1: document.write("Monday"); break; case 2: document.write("Tuesday"); break; case 3: document.write("Wednesday"); break; default: document.write("Another day"); }