Skip to content

Commit bc2d666

Browse files
authored
Update primitives.mdx
Correct the definition provided for Math.trunc. Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc
1 parent 5694068 commit bc2d666

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/src/pages/concepts/primitives.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ Even though the name says _Not a Number_, it is of type "number"
251251
- `min` is used to get the smallest of zero or more numbers
252252
- `sqrt` is used to calculate the square root of the given number
253253
- `pow` is used to calculate the power base on inputs
254-
- `trunc` is used to limit the total number of digits to represent the number (method is present on prototype of `Number`)
254+
- `trunc` is used to returns the integer part of a number by removing any fractional digits (method is present on prototype of `Number`)
255255
256256
```js copy
257257
Math.abs(-5)); // 5

0 commit comments

Comments
 (0)