mardi 22 août 2017

How to check if a input value equal to a number using conditions

how can i check if bath value is equal to a number and not any other kind of value i tried using NaN but it hasnt worked any other ways i could check ?

        if(bath != '') {
                var bath = 'there is this many bathrooms :'
                house['bathroom'] = square;
                bathRoom.innerHTML = bath + Bath; 
        }else{
                var bath = 'No Details Given';
                bathRoom.innerHTML = bath;

        }



Aucun commentaire:

Enregistrer un commentaire