Both attempts fail to sort the inner arrays:
a=[['c'],['b']]
a.sort(function(a,b){a[0]<b[0]}) // returns c,b
console.log(JSON.stringify(a))
a.sort(function(a,b){a[0]>b[0]}) // returns c,b
console.log(JSON.stringify(a))
What am I doing wrong? Thank you!
trueorfalse.a[0]<b[0]?1:-1did not work either: jsfiddle.net/0w7t3ov2/1returnin any of your functions.