`operator.charAt(0) === '-'` is more idiomatic for strings.