How can I Add and Delete values from a currency table I created?

Hi everyone,

This is my first-ever post in the Retool community.

So I need some help with the scripts for adding and deleting items inside the data array of the table component I am using.

Here are the screenshots:

Script for adding values: