JSFiddle - React, Tailwind, and code Playground

by Rey Den Nalasa

JavaScript

const array1 = [{test:1},{test:2},{test:3}];

const firstElement = array1.shift();

console.log(firstElement);
// expected output: Array [2, 3]