Update replace-switch-with-object-literal.md

Example now uses the hasOwnProperty method.