var period = document.getElementById('period').value;
var col = element.id.split('time')[1];
var ValueArr=[];
for(var x= 0;x < period; x++){
var taskValue = document.getElementById('taskDone'+x).value;
for(var p= 0;p < taskValue; p++){
var ValueB = document.getElementById(col+"_"+taskValue).value;
console.log(ValueB);
ValueArr.push(ValueB);
//var newValue = ValueArr.sort(function (a, b) { return a - b; });
}
}
alert(newValue);
So I have this in a function and I want to push ValueB into ValueArr. For ValueB it will be with unspecified length of numbers and with unspecified numbers but when I try I get This:https://i.sstatic.net/QqVpm.jpg