i want just get 3.14 how can i get that?
Language: js Code: const round = (n, digits = 2) => { const exp = 10 ** digits; return Math.round(n * exp) / exp; }; console.log(round(3.1415926535)); Output: 3.14
** mean pow right?
Обсуждают сегодня