Функция getOutdated принимает массив роботов robots и возвращает массив индексов для роботов, у которых core_version меньше новой версии newVersion ПО.
Пример:
const robots = [{core_version: 9}, {core_version: 13}, {core_version: 16}, {core_version: 9}, {core_version: 14}];
getOutdated(robots, 10) === [0, 3]
getOutdated(robots, 14) === [0, 1, 3]
getOutdated(robots, 8) === []
getOutdated(robots, 18) === [0, 1,]
**************************************************  ***
function getOutdated(robots, newVersion) {
   var indexes = [];
  for(let i = 0; i < robots.length; i++){
    if(robots[i].core_version< newVersion){
     robots[i].core_version =0;
    }
     var index = robots.indexOf( {core_version: 0 ); /
 
     while ( index != -1 ) { 
  indexes.push( index ); 
  index = robots.indexOf( searchElement, index + 1 ); 
  }
  return index;
}
}
getOutdated ([{core_version: 13}, {core_version: 16}, {core_version: 9}, {core_version: 14}], 15);
**********************************
function getOutdated(robots, newVersion) {
   var indexes = [];
  for(let i = 0; i < robots.length; i++){
    if(robots[i].core_version< newVersion){
     return i;
    }
   
}
}
getOutdated ([{core_version: 13}, {core_version: 16}, {core_version: 9}, {core_version: 14}], 15);
но как записать і в массив?