Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

JavaScript - Casting String to Integer

Avatar

Level 5

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?