0
How can I write this IF condition.
While using an if statement, I want to write a condition "If an input is a number". How can I write it as a condition in if statement. Can anyone tell me what the code will be.
3 Answers
+ 1
Set the input to a variable. Then use google to find the name of the method that checks if a variable is a number. Should be something like .isNumber() but not sure of the name.
0
Thanks for your help. I found a method isInteger(). I hope it'll solve my problem.
0
Should work.