strip decimal points from variable May 9, 2023 by Tarik Simply… Math.round(quantity); …assuming you want to round 1.7 to 2. If not, use Math.floor for 1.7 to 1.