I have an array containing numerical values like this:
myArray = [432.2309012, 4.03852, 6546.46756];
I want to have maximum 2 digits after the dot so I use toFixed(2):
myArray.forEach(a => a.toFixed(2));
The result that is returned is undefined
. Is something wrong?