Skip to main content

Command Palette

Search for a command to run...

#consol.log("Day-2");JavaScript Function ,Math.trunc()

Math.trunc()

Published
1 min readView as Markdown
#consol.log("Day-2");JavaScript Function ,Math.trunc()
N

student, Coder, Programmer

The Math.trunc() a static JavaScript function accessed using a Math object is used to get the integer portion of a floating-point number. it eliminates all fractional digits and truncates the number to the right of it. it only takes a single parameter (number) and outputs the integer portion of the provider number. it is supported by all browsers.

console.log(Math.trunc(15.56));                    console.log(Math.trunc(15.56));

//output 15                                     
//output  -123
31 views

Daily New Things

Part 1 of 2

Here you find daily updates and news in short form, in simple language. It daily blog for some programing language updates. I don't consider this to be my original source.

Up next

#consol.log("Day-1");JavaScript Function ,Math.round()

JavaScript Math.round