Javascript Quirks with special values and Operations