jeudi 22 juin 2017

JavaScript Comparison the "if" keyword

this is my way to check if the age is odd

var age = prompt("what is your age?")
if (age % 2) {
    cobsole.log("your age is od")
}

first: is it a good way? second:How can I check if a given number is perfect square?

Aucun commentaire:

Enregistrer un commentaire