testing switch statements in JS and HTML