function toArray(obj){ return [].slice.call(obj) } alert( toArray( {1:'a',2:'b',length:2} ).pop() )
[var obj={m:1, n:2, s:3, length:3}; var arr1=[].slice.call(obj); alert(arr1);