Storing an item's price in a variable

Hi everybody! I recently made the jump from good old XP to MV, but Javascript is still a strange and daunting thing for me. Hope you can help.


I absolutely need to store an item's price in a variable. I found no way to do this with events, but I assume it must be doable with a bit of JS. Can someone tell me how to do it, pretty please?


I really don't know where to bang my head.
$dataItems[x].price
Oooh, it worked! Thank you very much!

Original thread: https://forums.rpgmakerweb.com/threads/storing-an-items-price-in-a-variable.62368/