| You are here: DEVPPL ‹ Forum ‹ Programming ‹ JavaScript Forum |
NOTIFICATIONS
|
|
|||||||||||||||
Login |
IF statement - Number format
2 posts
• Page 1 of 1
0
IF statement - Number format
I am having input in number format or normal string , I have to write a code in JS where if input is number it changes its format, for instance 315.0(input) it should convert to 315(output) , otherwise if input is 315A(input) it should return same output (315A).
Here's a piece of my code but it doesn't work
if (input != 000.0) {
output = input;
} else {
output = 000;
}
Thanks
Ali
Here's a piece of my code but it doesn't work
if (input != 000.0) {
output = input;
} else {
output = 000;
}
Thanks
Ali
- Alibzafar
- Reputation: 0
- Posts: 1
- Joined: Wed Apr 27, 2011 1:51 pm
- Highscores: 0
- Arcade winning challenges: 0
- Rajmv
- Reputation: 0
- Posts: 103
- Joined: Thu Jul 14, 2011 8:22 am
- Highscores: 0
- Arcade winning challenges: 0
|
|