{"ScriptPreparationCode":null,"TestCases":[{"Name":"test 1","Code":"function round1( value, decimals) {\r\n let _decimals = decimals || 0;\r\n\tlet roundedValue = parseInt(value * Math.pow(10,_decimals) \u002B 0.5) / Math.pow(10,_decimals);\r\n \r\n if (roundedValue % 1 == 0) {\r\n \troundedValue = parseInt(roundedValue);\r\n }\r\n\t\r\n return roundedValue;\r\n}\r\n\r\nreturn round1(4.55, 1);","IsDeferred":false},{"Name":"test 2","Code":"function round2( value, precisione) { // formato 1,234.56 / F\u00B0\r\n return Number.parseFloat(value).toFixed( precisione);\r\n}\r\n\r\nreturn round2(4.55, 1);","IsDeferred":false}]}