I am working on some calculation and my calculation result is giving me `NaN`.
So I used something like below which converts it `0` which was fine

```
Number((((0-0)/0)*100).toFixed(2)) || 0

```

until the result is -Infinity and i found out that `-Infinity` is numeric value. So now i did something like below to convert `-Infinity` to `0`

```js
var result = Number((((0-18)/0)*100).toFixed(2)) || 0
if (result == Number.POSITIVE_INFINITY || result == Number.NEGATIVE_INFINITY)
{
    result=0;
 console.log(result)
}
```

This is solving the problem but is there a shorter or better approach?