# \[AS3\] sortOn question

**URL:** <https://forum.kirupa.com/t/as3-sorton-question/273745>\
**Category:** Uncategorized\
**Created:** [October 20, 2008, 9:04am UTC](https://forum.kirupa.com/t/as3-sorton-question/273745 "2008-10-20T09:04:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valaran](https://avatars.discourse-cdn.com/v4/letter/v/ee59a6/32.png) [@Valaran](https://forum.kirupa.com/u/Valaran)\
**Post date:** [October 20, 2008, 9:04am UTC](https://forum.kirupa.com/t/as3-sorton-question/273745/1 "2008-10-20T09:04:03Z")

</div>

Array.sortOn(); How is this sort performed, and how does it differ from just doing a simple loop through the array and sort based on that? Let’s imagine I didn’t think of this function while developing something, and I happened to sort things by looping through it, would there be any significant difference on switching my ugly loop to this?

Thank you.
