Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

number.toString takes no params, browser takes a radix #1254

Open
johnstonmatt opened this issue Sep 16, 2018 · 1 comment
Open

number.toString takes no params, browser takes a radix #1254

johnstonmatt opened this issue Sep 16, 2018 · 1 comment

Comments

@johnstonmatt
Copy link

Is your feature request related to a problem? Please describe.
I am trying to build a counter with a micro:bit that represents binary numbers using Neopixels, it is currently difficult to convert an integer from base10 to base2, though that is easy in the browser. You can just pass the radix in as a param, but the make code platform number.toString takes no args.

Describe the solution you'd like
Reflect the toString functionality that is standard in the browser

Describe alternatives you've considered
A new function for going from base 10 to a base 2 string could work

Additional context
Thanks!

@Thefurypig
Copy link

@riknoll progress ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants