by @kodeazy

How to remove Decimal part from javascript number?

Home » javascript » How to remove Decimal part from javascript number?
  • Using parseInt() we can remove the decimal part from the number.

    var z=5.5;
    z=parseInt(z);
    console.log(z);

    Output:

    5