Help with adding to an array

Agian im asing for help but this is what we all are here for right? Anyway, I have an array

inventory = [];

I add to the array by clicing on the item and changing the ID to what the item is.

_root.ID=“Axe”;

Then I enter an amount in which to buy

_root.amount=_root.amount_mc.new_amount_txt.text;

How to I add my ID into the array as many times as I have in the amount.