12 lines
210 B
JavaScript
12 lines
210 B
JavaScript
|
function cleanArray (actual) {
|
||
|
var newArray = [];
|
||
|
for (var i = 0; i < actual.length; i++) {
|
||
|
if (actual[i]) {
|
||
|
newArray.push(actual[i]);
|
||
|
}
|
||
|
}
|
||
|
return newArray;
|
||
|
}
|
||
|
|
||
|
module.exports = cleanArray;
|