DEV Community

Discussion on: Minimize the below code

Collapse
 
_garybell profile image
Gary Bell

You could try:

if (isNaN(parseFloat(customerIdNumber)) {
  alert('success');
}
Enter fullscreen mode Exit fullscreen mode

Based off the following:
Webtools console output