JSFiddle - React, Tailwind, and code Playground
by 3rror404
JavaScript
var shadow = 'rgba(0, 0, 0, 0.5) 0px 0px 150px 0px inset'; //document.getElementById("demo").style.boxShadow;
console.log(shadow.split(' '));
shadow = swapFirstLast(shadow.split(' ')).join();
console.log(shadow);
function swapFirstLast(arr) {
var lastIndex = arr.length -1;
var firstEl = arr[0];
arr[0] = arr[lastIndex];
arr[lastIndex] = firstEl;
return arr;
}