Replacing switch statements with Object literals This example demonstrates how you can replace JavaScript switch case by Object literals. References Replacing switch statements with Object literals