Javascript Array cleanArray(actual)

Description

Javascript Array cleanArray(actual)


Array.prototype.cleanArray = (actual) => {
  var newArray = new Array();
  for (var i = 0; i < actual.length; i++) {
    if (actual[i]) {
      newArray.push(actual[i]);//w w  w.  j ava2 s.  c o  m
    }
  }
  return newArray;
}

module.exports = exports = cleanArray



PreviousNext

Related