ERROR Properties of the divisibility + Javascript

good night... I am working in a project that pretends to resolve problems of divisibility(maths). The problem that i am having, is when i write the properties of the divisibility, that are:

a ≥ b

b ≠ 0

r < b

The error is it in the line code 13: var r <= b; I do not know too much JavaScript so if anyone knows a solution for this. I will be grateful, thanks... Here it is the code:

    // ask to the user
    var a = parseInt(prompt("Ask a value for A"));
    var b = parseInt(prompt("Ask a value for B"));

    // properties
    var b != 0;
    var a >= b;
    var q;
    var r <= b;

    if(a <= b){
    document.write("A have to be higher than B");
    }

    if (b == 0) {
      document.write("B have to be different from 0");
    }

1 answer

  • answered 2018-08-09 00:22 Rastalamm

    If you remove your properties, your if statements will work:

    Remove the below:

    // properties
    var b != 0;
    var a >= b;
    var q;
    var r <= b;