commit
60985627bb
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ So primitives can provide methods, but they still remain lightweight.
|
|||
|
||||
The JavaScript engine highly optimizes this process. It may even skip the creation of the extra object at all. But it must still adhere to the specification and behave as if it creates one.
|
||||
|
||||
A number has methods of it's own, for instance, [toFixed(n)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed) rounds the number to the given precision:
|
||||
A number has methods of its own, for instance, [toFixed(n)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed) rounds the number to the given precision:
|
||||
|
||||
```js run
|
||||
let n = 1.23456;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue