Javascript is a flexible language. It allows you to do things in multiple ways. One of these, is branching with switch or object literals. Many people have already debated as to what is the best way to write this. I personaly find the object literal cleaner.… Read More