The idea is that I should have an array of objects with a length of 4:
const array = [{}, {}, {}, {}]; I want the value to always fall into the first position when pushing into this array, and the existing values are shifted to the right. That is, the first value fell into second place, the second - into third, and so on. I thought that the splice() function would help me with this, but this is not what I need. How can I implement my plans without resorting to frameworks?