Monday, August 14, 2017

Small and simple question about Javascript

Hello everyone Like the title says, this is a very simple question but I just can't figure it out.This is my code: PHP Code: var age = prompt("What is your age?");if(age < 0){        console.log("Error - Invalid number.");}if(age % 2 == 0 && age > 0){         console.log("Your age is an even number.");}else if(age % 2 == 1){         console.log("Your age is an odd number.");}

http://codango.com/small-and-simple-question-about-javascript/

I am happy to share this resource that we found. The content displayed on this page is property of its original author or their organization.

No comments:

Post a Comment