We have string input numbers input="6145390195186705543" If we want to convert to a number; the java script automatically rounds this input;
(6145390195186705543)
(6145390195186705000)
This should suit what you want to achieve
const myFunction = (num) => { const length = num.length; const result = `(${num.slice(0,16).padEnd(length, "0")})`; return result; }; const input="6145390195186705543"; const output = myFunction(input); console.log(output)
This should suit what you want to achieve