-
SeniorMember yet almost newbie
any number
is there a way of seting a variable to be any number?
for example
n= real numbers
or
n=infinite
or
n= any number between 0 and 999
-
n = random(999);
or
n = Math.random()*999;
-
SeniorMember yet almost newbie
mmm no
what I want is to be all the numbers, not just one of them... I want to make it so that is I ask if N is equal to 9, the answer is true and if I ask if N is equal to 4, the answer is true again
And so on with every number between 0 and 999
-
if N==9, then N!=4
May be you ask about Number(N)?
Number(N) is always a number.
-
SeniorMember yet almost newbie
here
what I mean is that 8,9,2,4 they are all numbers
If N="any number" then N=4 and also N=2 and N=6
Is this possible?
-
Do you yourself understand your own question?
Why should N = 2 or 6, if N is alredy == 4?
If you want to know whether some variable is a number, you can
use function isNaN(variable). If it's a number, isNaN returns false,
if it's not a number then isNaN returns true.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|