JSFiddle - React, Tailwind, and code Playground

JavaScript

function roundToTwo(num) {    
    alert(+(Math.round(num + "e+2")  + "e-2"));
}

roundToTwo(2.555)