Question : Remove leading characters in a string, convert to integer, add, convert back to string

Using Javascript...

I have two strings that begin with '$ '.  
I need to convert them to integers after stripping off the first two characters.  
Then, I need add them them and convert the result to a string, adding back the '$ ' characters at the beginning.

Answer : Remove leading characters in a string, convert to integer, add, convert back to string

oops. forgot to prepend the '$'
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:


 

 


Open in New Window Select All
Random Solutions  
 
programming4us programming4us