10. Game of epicness - JavaScript advanced
Здравейте,
при този код ми дава грешка при изпълнението когато сортирам генералите на победителя. И при двата нулеви теста не ми дава грешка на моя комп. Къде бъркам ?
C:\Windows\TEMP\ExecutionStrategies\5pbkwo0r.4e2\tmpD380.tmp:180 winningKingdom.generals.sort(function(a, b){ ^ TypeError: Cannot read property 'generals' of undefined at solve (C:\Windows\TEMP\ExecutionStrategies\5pbkwo0r.4e2\tmpD380.tmp:180:20) at adapter (C:\Windows\TEMP\ExecutionStrategies\5pbkwo0r.4e2\tmpD380.tmp:203:12) at Socket.<anonymous> (C:\Windows\TEMP\ExecutionStrategies\5pbkwo0r.4e2\tmpD380.tmp:210:18) at Socket.emit (events.js:214:15) at endReadableNT (_stream_readable.js:1178:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)