JavaScript not handling underscores in numbers

When I have underscores in numbers, like this code, it shows an error in the JavaScript editor. Underscores can be used inside numbers in JavaScript to improve readability (developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar).

const x = 123_456;

return x;

Here are the errors when using this code:
image
image

After removing the underscore, there are no errors:
Screenshot 2024-04-17 103059

Hi @OlliePartly, thank you for your feedback! :slightly_smiling_face:
We created a bug report for this and we'll update you when it's fixed. On the meantime, you can ignore the tooltip.

The code should run as expected:

1 Like