Editing JavaScript/Notes/Array
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 139: | Line 139: | ||
Write a function that sorts an array of strings case-insensitively. | Write a function that sorts an array of strings case-insensitively. | ||
<source lang="javascript"> | <source lang="javascript"> | ||
var input = ["penguin", " | var input = ["penguin", "Bear", "pelican", "ostrich"]; | ||
sortStringsCI(input); // ["Bear", "pelican", "penguin", "ostrich"]; | sortStringsCI(input); // ["Bear", "pelican", "penguin", "ostrich"]; | ||
</source> | </source> |