I tried with Math.abs but I getting NAN
Use map
var arry = [-2.5699, -1.4589, -3.2447, -6.9789 ,-9.213568];
arry = arry.map( s => Math.abs(s));
Demo
var arry = [-2.5699, -1.4589, -3.2447, -6.9789, -9.213568];
arry = arry.map(s => Math.abs(s));
console.log(arry);
Edit
In short (as @pwolaq suggested)
arry = arry.map(Math.abs)
Edit 2
Missed the rounding off part
var fnRound = (s) => +String(s).match(/\d+\.?\d{0,2}/)[0];
var arry = [-2.5699, -1.4589, -3.2447, -6.9789, -9.213568];
arry = arry.map(Math.abs).map( fnRound );
Demo
var fnRound = (s) => +String(s).match(/\d+\.?\d{0,2}/)[0];
var arry = [-2.5699, -1.4589, -3.2447, -6.9789, -9.213568];
arry = arry.map(Math.abs).map( fnRound );
console.log(arry);
Regex Explanation /\d+\.?\d{0,2}/
\d+
to match digits before decimal
- .? to match a decimal
0
or 1
times.
\d{0,2}
to match 2 digits after decimal.