I have the following code that outputs the length of an array, deletes it, and then outputs the new length:
console.log($scope.adviceList.activeAdvices.lengt
For my part, I redefined the length after delete:
var cars = ["BMW", "Volvo", "Saab", "Ford"];
delete cars[1];
/// 1st option ///
for (var i = 0; i < cars.length; i++){
if(i in cars)
document.write(cars[i] + " ");
}
/// return: BMW Saab Ford
/// 2nd option ///
cars.length--;
var realLength = cars.length;