Skip to content

Commit 37ae96e

Browse files
committed
Removed .map(). There was no need for it
1 parent 276d31f commit 37ae96e

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

js/script.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,9 @@ function myExcelFuns() {
3939
var numberStr = document.getElementById("numbers").value;
4040

4141
numberStr = numberStr.trim();
42-
var numberArr = numberStr.split(" ").map(Number);
42+
var numberArr = numberStr.split(" ");
43+
console.log(numberArr);
4344

44-
var total = 0;
45-
for (var i = 0; i < numberArr.length; i++) {
46-
if (numberArr[i] != "") {
47-
total += parseFloat(numberArr[i]);
48-
}
49-
}
5045

5146
var result;
5247
if (document.getElementById("arrSum").checked) {

0 commit comments

Comments
 (0)