num = parseInt('12')

num = parseFloat('12.12')

...should do the trick