JSFiddle - React, Tailwind, and code Playground by Trần Ngọc Minh March 24, 2017 JavaScript var num = 13.3714; var n = num.toPrecision(2);// n = 13