How to add item from items list to inventory and print it?
var items = {
knife: {
name: "Knife"
}
};
var inventory = {};
//document.write(inventory....);
Or am I not understanding something and making everything wrong? maybe objects is wrong choice?
I want output just to print item name like knife. But not from var items - Print it from inventory
Everything should work like picking up item from ground.