JSFiddle - React, Tailwind, and code Playground

JavaScript

var a = [1,2,3,4],
    b = a[2, 1, 0, 1];

console.log(b);