Expand my Community achievements bar.

JavaScript - Casting String to Integer

Avatar

Former Community Member

Hi there!

I can't believe I'm asking this.

I need to convert strings into integer and so far I haven't found any function in the documentation.

Is there such a function?

I've tried parseInt(), does not work. Tried Number(), same results.

Thank you for any hints!

Marcos

1 Reply

Avatar

Level 10

I think either of those should work...what does your code look like?