Is there a way of doing this:
var numbers = [156,845,34,849,5,48,54,8,879];
and then a condition to check the array to see if there are any values that are less than 10 and for it to output the index value of each item that is less than 10?
So the above would output 4 & 7
results = [];
for(key in numbers) {
if (numbers[key] < 10) results.push(key);
}
console.log(results);