Below is the code snippet.
Expected : The output of the alert must be:
210 then 202 then 201
Working currently :
201 then 202 and 210.
Issue is, I want in insertion order and not in sorted order.
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
var newItem = new Array();
newItem['210'] = new Array(1,'test1');
newItem['202'] = new Array(2,'test1');
newItem['201'] = new Array(3,'test1');
for(var item in newItem) {
alert(item);
}
</script>
</body>
</html>