JSFiddle - React, Tailwind, and code Playground by Malin Jayakody August 19, 2019 JavaScript let x = ""; console.log(x.split("-")[0]);