Updated problem example to a working implementation matching the solution style (#35062)

This commit is contained in:
David
2019-04-02 19:47:17 -05:00
committed by Randell Dawson
parent b4d3e6d6bb
commit 685dbbde7f

View File

@ -11,7 +11,7 @@ In the example given we see how to write a function which will return a new arra
function reverseAlpha(arr) {
return arr.sort(function(a, b) {
return a < b;
return a !== b ? a > b ? -1 : 1 : 0;
});
}
reverseAlpha(['l', 'h', 'z', 'b', 's']);