I want to sort an array of images by the Image.src attribute. I assume I need to use the oprional sortby parameter in the Array.sort() method, but I am having trouble figuring out exactly how to implement this correctly. Any ideas anyone?
Thanks in advance.
imageArray.sort(function (img1, img2) { return img1.src.localeCompare(img2.src) })
Help @jzwill spread the word by sharing this article on Twitter...