diff --git a/02-rozwiazanie.js b/02-rozwiazanie.js index 10237a3..2af6f2b 100644 --- a/02-rozwiazanie.js +++ b/02-rozwiazanie.js @@ -2,10 +2,11 @@ let Polynomial = require('./polynomial.js'); let mul, div, gcd; function parseArray(x) { + let stringResult = ""; result = Array.from(x).filter(x => { - if (x == ' ' || x == '[' || x == ']' || x == ',') return false; + if (x == ' ' || x == '[' || x == ']') return false; else return true; - }).map(x => parseInt(x)); + }).join('').split(',').map(x => parseInt(x)); return result; }