Don't use println; use print instead. For you to figure out the difference ![]()
Learn not to use String (capital S). It's a potential recipe for difficult to find bugs due to memory leaks. Your usage is totally redundant, you could in your current code just as well print var.
parseInt is a blocking function and that might bite you in the future; don't use it.
And follow the link above, read it and understand it. It gives you everything you need avoiding the possibility of the above mentioned problems.