Change declaration variable

master
Frédéric Matte 2023-09-28 22:51:48 -04:00
parent d23e5ce91a
commit 7a6562e44e
1 changed files with 2 additions and 2 deletions

View File

@ -2,8 +2,8 @@ const sortby = (properties) => (a, b) => {
// if items is {prop1:value1, prop2:value2} // if items is {prop1:value1, prop2:value2}
// then sort(['prop1', 'desc', 'prop2']) // then sort(['prop1', 'desc', 'prop2'])
// will sort by prop1 desc and prop2 // will sort by prop1 desc and prop2
for (var i = 0; i < properties.length; i++) { for (let i = 0; i < properties.length; i++) {
var property = properties[i] const property = properties[i]
let order = -1 let order = -1
if (i + 1 < properties.length && properties[i + 1] === 'desc') { if (i + 1 < properties.length && properties[i + 1] === 'desc') {