Created
December 20, 2015 05:53
-
-
Save edubkendo/ee1dc0b65d46736ff90d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function inputCheck (shitumon, outputNum) { | |
var condition = true; | |
var a = -1; | |
while(condition) { | |
console.log(a); | |
if (isNaN(a) || a <= -1) { | |
console.log("Invalid imput, please enter a number only!<br>"); | |
a = 5; | |
} else { | |
condition = false; | |
outputNum = a; | |
} | |
} | |
return outputNum; | |
} | |
inputCheck("Please enter a number!", table); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment