Less than equal to in javascript

Less than equal to

<p id="show"></p>
<input type="number" id="d1" placeholder="Enter digit 1" /><br><br>
<input type="number" id="d2" placeholder="Enter digit 2" /><br><br>
<button onclick="check()">Check</button>

function check() {
    var d1 = document.getElementById('d1').value;
    var d2 = document.getElementById('d2').value;
    if(d1 <= d2) {
        document.getElementById('show').innerHTML = 'd2 is greator than or equal to d1 ';
    else {
        document.getElementById('show').innerHTML = 'd2 is less than d1 ';

Related Sourcecode

More Sourcecode

Google login
SignUp with Email