function div(x) {
if (isFinite(1000 / x)) {
return 'Number is NOT Infinity.';
}
return 'Number is Infinity!';
}
console.log(div(0));
// Expected output: "Number is Infinity!""
console.log(div(1));
// Expected output: "Number is NOT Infinity."