JSFiddle - React, Tailwind, and code Playground

by Yuriy Petrichenko

JavaScript

var arr = [1,2,3,4];
arr.splice(0,1,{a:1});
console.log(arr);