C Program For Sorting Array Javascript Iteration