Difference between revisions of "Bugs and mistakes"
From Wiki2
Line 17: | Line 17: | ||
NOT | NOT | ||
</pre> | |||
<s>const sorres =conres.sort((a,b)=>a.variety < b.variety)</s> | <s>const sorres =conres.sort((a,b)=>a.variety < b.variety)</s> | ||
Latest revision as of 13:59, 2 April 2019
bugs and mistakes I always make
for sorting
const conres = { variety: 'Glacier', dot: 'yellow', num: 0 }, { variety: 'Supersweet 100', dot: 'blue', num: 0 }, { variety: 'Brandywine', dot: 'red', num: '5' }, { variety: 'Purple Cherokee', dot: 'purple', num: '7' }, { variety: 'Moskovich', dot: 'green', num: '4' }, { variety: 'Valencia', dot: 'orange', num: '4' }, { variety: 'Striped German', dot: 'pink', num: '4' }, { variety: 'Glacier', dot: 'yellow', num: '4' }, { variety: 'Supersweet 100', dot: 'blue', num: '4' }, const sorres =conres.sort((a,b)=>a.variety < b.variety ? -1 :1) NOT
const sorres =conres.sort((a,b)=>a.variety < b.variety)