Не получается...
function compareRobots(firstRobotResults, secondRobotResults) {
firstRobotResults.reduce((sum, current) => sum + current);
secondRobotResults.reduce((sum, current) => sum + current);
if(firstRobotResults>secondRobotResults){
return 'First robot for sale!';
}
if(firstRobotResults<secondRobotResults){
return "Second robot for sale!";
}
if(firstRobotResults=secondRobotResults){
return 'Both robots for sale!';
}
}
|