Hi, help please with the task, the code is there, but I incorrectly prescribed something in it. It is necessary that sorting occurs in ascending kernels (cores)
let arr = [ {cpu: 'Intel', info: {cores: 2, cache: 3 }}, {cpu: 'Intel', info: {cores: 4, cache: 4 }}, {cpu: 'amd', info: {cores: 1, cache: 1 }}, {cpu: 'Intel', info: {cores: 3, cache: 2 }}, {cpu: 'amd', info: {cores: 4, cache: 2 }}, ] function sortByCores() { arr.sort(( prev, next ) => prev.cores - next.cores); return arr; }
prev.info.cores. Well, cnextsimilar. - Yaant