JSFiddle - React, Tailwind, and code Playground by Alexey Ryazhskikh June 25, 2019 JavaScript var xxx = ["123", "321", ""]; var result = xxx.filter(x => !!x); console.log(result);