Fixed javascript typo

The case x, y, z: statement is not valid in javascript.

Also properties with a name containing a dash cannot be accessed using dot notation.