For this exercise we are working with JS Array.sort() method.
We will sort band names without the articles so that the band names are still in alphabetical order after stripping the articles ‘a’, ‘the’, ‘an’.
I took Kyle Simpson’s advice and used a named function expression as an argument in the sort() method, as opposed to using an anonymous function expression.
According to Kyle named function expressions are more descriptive and they highlight to the reader, the purpose of the function. In this case instead of using a fat arrow function, I have used the name compareBandNames as the function name to describe the work that it is doing.
Code snippets shown below: