Jquery convert integer to string and back

Posted by Richbyte on Stack Overflow See other posts from Stack Overflow or by Richbyte
Published on 2010-05-02T04:30:02Z Indexed on 2010/05/02 4:37 UTC
Read the original article Hit count: 207

Filed under:
|
|

These are the logical steps which i need render with jquery:

var x is a 2 digit number(integer) derived from an input.value();

If var x is not 33 or 44

  Convert this 2 digit number to string;
  split the string in 2 parts as number;
  Add these 2 values;
  Return var x value as this value.

Else

Return var x value literally as 33 or 44 whatever is the case.

Thanks!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about number