Possible Duplicate:
Javascript swap array elements
For example i have an array var arr = ['one', 'two', 'three'];
and i wona to replace 1st key to 2nd and my array should start to look like ['two', 'one', 'three'];
how can i do that, it need to me for bubble sorting