Here are examples of some input that I may be given
1,4
34,2
-99,20
etc.
Therefore negative values are included and 1, 2, 3, etc digits are possible. Commas are not the only delimiters, just an example. But Non integer values are the reason parseInt won’t work. What can I code that will allow me to parse the above 3 inputs so that I get this?
1
34
-99
Use this code:
OUTPUT: