JSFiddle - React, Tailwind, and code Playground
by rmurphey
JavaScript
var str = 'a-b-c',
arr = str.split('-'),
id = arr.shift(),
theRest = arr.join('-');
console.log(id, theRest);
by rmurphey
var str = 'a-b-c',
arr = str.split('-'),
id = arr.shift(),
theRest = arr.join('-');
console.log(id, theRest);