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

string.toFixed #273

Open
pelikhan opened this issue Mar 25, 2023 · 6 comments
Open

string.toFixed #273

pelikhan opened this issue Mar 25, 2023 · 6 comments
Labels
client api core js enhancement New feature or request good first issue Good for newcomers

Comments

@pelikhan
Copy link
Member

tends to land in generated code.

   console.log(
        `Temperature: ${temperature.toFixed(2)}°C, Humidity: ${humidity.toFixed(
            2
        )}%`
    )
 
@pelikhan pelikhan added enhancement New feature or request client api labels Mar 26, 2023
@pelikhan pelikhan added good first issue Good for newcomers core js labels Jun 26, 2023
@JackTam1993
Copy link

Do you mean the toFixed function of Number? I think I can handle it.

@JackTam1993
Copy link

I added a function called toFixed and I wrote a test case to test it. when I run the test function, it returned message: setting field 'toFixed' of a builtin frozen object.

@pelikhan
Copy link
Member Author

Do you have a pull request we could look at?

@JackTam1993
Copy link

#621 here is the pull request. Thank you.

@pelikhan
Copy link
Member Author

@mmoskal is number prototype special handled by the compiler?

@mmoskal
Copy link
Member

mmoskal commented Nov 1, 2023

See comment on PR #621 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client api core js enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants