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() doesnt support a radix argument. #5957

Open
NiclasTheSquirrel opened this issue Sep 28, 2019 · 0 comments
Open

number.toString() doesnt support a radix argument. #5957

NiclasTheSquirrel opened this issue Sep 28, 2019 · 0 comments

Comments

@NiclasTheSquirrel
Copy link

Describe the bug
The number.toString() function, should be able to have the argument "radix" when you try this on
the micro:bit makecode website, it will produce this error:
error TS2554: Expected 0 arguments, but got 1.
In actual javascript, you should be able to use this function with an argument.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString

To Reproduce
Goto the javascript editor on makecode, and try the following:
basic.showString(11.toString(2))

Expected behavior
convert 11 to binary and, show the string "1011" on the screen.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: 77.0.3865.90 64 bit
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

2 participants