Updated Solution to JavaScript Numeric Validation Exercise