I need to find if my result is a number from 1 to 100, not infinite, but sometimes i have that result. How i can check if result in infinite.
I know i can do it using if statement
x =Math.floor(1/1)
if(x == 1/0){
return 0}
else{
return x}
But i need it on one line
x =Math.floor(1/1)(1/0 ? "0" : x);
I try that but i have a error... what i missing? I need that because i use it for loop statement and have around 500 numbers to sort and calculate... but without that check sometimes i have infinite result..
Anyone can help?