So I'm making a game, but I'm having trouble selling items. I made the object
var price = {
sword:3,
fish:1
}
And once you click on something with class "item", it should tell you the price Except It isn't working
$(".item").click(function(){
alert(price.(this.id))
});
Can someone help me?