JSFiddle - React, Tailwind, and code Playground

JavaScript

var num = 2.4098;
alert((Math.floor(num * 100) / 100).toFixed(2));