Trying to make this sort function assert true. Not sure why it is not working.
function sortThis() {
var args = [].slice.call(arguments);
var myArray = ['Toyota', 'bmw', 'mercedes', 'cadillac', 'Ford', '1Mitsubishi', 'buick'];
for (var i = 0; i < args.length; i++) {
myArray.sort();
}
return myArray;
}
console.assert( sortThis(['apples', '3mango', 'tomatoes', '1blackberries', 'oranges', 'Peaches']) === ['1blackberries', '3mango', 'Peaches', 'apples', 'oranges', 'tomatoes']);