Compare Revisions

Math.trunc()

Change Revisions

Revision 485945:

Revision 485945 by ziyunfei on

Revision 485947:

Revision 485947 by ziyunfei on

Title:
Math.trunc()
Math.trunc()
Slug:
Web/JavaScript/Reference/Global_Objects/Math/trunc
Web/JavaScript/Reference/Global_Objects/Math/trunc
Tags:
"Math", "Experimental", "Method", "JavaScript"
"Math", "Experimental", "Method", "JavaScript"
Content:

Revision 485945
Revision 485947
t46Math.trunc(0.123)  //  0t
47Math.trunc(-0.123) // -0
48Math.trunc(13.37)  // 1346Math.trunc(13.37)   // 13
49Math.trunc(42.84)  // 4247Math.trunc(42.84)   // 42
48Math.trunc(0.123)   //  0
49Math.trunc(-0.123)  // -0
50Math.trunc("-1.123")// -1
51Math.trunc(NaN)     // NaN
52Math.trunc("foo")   // NaN
53Math.trunc()        // NaN

Back to History