Sort Array By Property Javascript Interview