check if decimal number contains percentage javascript code example Example: js check if number has decimals num % 1 != 0