amount: 83,
dat: "2021-04-01"
},
{
amount: 64,
dat: "2021-04-02"
},
{
amount: 29,
dat: "2021-04-03"
},
{
amount: 4,
dat: "2021-04-04"
},
{
amount: 148,
dat: "2021-04-05"
},
{
amount: 114,
dat: "2021-04-06"
},
{
amount: 186,
dat: "2021-04-07"
},
{
amount: 82,
dat: "2021-04-08"
},
{
amount: 128,
dat: "2021-04-09"
},
{
amount: 33,
dat: "2021-04-10"
},
{
amount: 2,
dat: "2021-04-11"
},
{
amount: 10,
dat: "2021-04-12"
}
];`
Как найти index dat: "2021-04-11" числа ?
totals.findIndex((element) => element.dat === "2021-04-11")
Обсуждают сегодня