Тема: Запис в функцію конструктор.
Вітання.
Допоможіть зрозуміти як зробити так, щоб коли я додаю значення в art.add і потім виводжу art.list воно не виводило лише останнє значення яке я записав, а виводило всі значення які я записував. Дякую.
Ось мій код:
var arr = [];
class Art {
    constructor() {}
    add(date, amount, currency, product) {
        this.date = date;
        this.amount = amount;
        this.currency = currency;
        this.product = product;
    }
    list() {
        return arr = [this.date, this.amount, this.currency, this.product];
        console.log(arr);
    }
    clear(date) {
        arr.splice(1, 1);
        console.log(this.list());
    }
    total() {
        return this.amount + this.currency;
    }
}
const art = new Art();
art.add('2017-04-25', 2, 'USD', 'Jogurt');
add.push(('2017-03-13', 5, 'EUR', 'Milk'));
console.log(art.list());
console.log(art.total());