w3schools javascript string comparison code example Example: less than or equal to javascript if(a <= 5){ yourFunction(); }