I have textarea and textare jsccode as the following :
var checkName = (document.getElementById("List").value);
var tempcheckNames = checkName.split('\n');
and assign array another array with trim.
for (var i = 0; i < tempcheckNames.length;i++){
checkNames = tempcheckNames[i].trim().split('\n');
}
But checkNames is empty because assign with not array ?
So I want to trim from textarea value (I did textarea value split so my array is textarea value ('\n')
checkNamesbe a string, an array, or an array of arrays?checkName.split('\n').map(function(item){ return item.trim(); })