Our intention for toFixed and toPrecision is to allow them to take no arguments, similar to how those methods work on Numbers. I wrestled with ecmarkup to get the notation right for that, trying various things, but nothing worked. As a consequence, the best I could do was to make the first argument mandatory and the second argument optional. But there is a way! And here it is. Thanks to @ben-allen for the solution.
Since this is a normative change, please do not merge this PR until after the next TC39 plenary.
Our intention for
toFixed
andtoPrecision
is to allow them to take no arguments, similar to how those methods work on Numbers. I wrestled with ecmarkup to get the notation right for that, trying various things, but nothing worked. As a consequence, the best I could do was to make the first argument mandatory and the second argument optional. But there is a way! And here it is. Thanks to @ben-allen for the solution.Since this is a normative change, please do not merge this PR until after the next TC39 plenary.