JSFiddle - React, Tailwind, and code Playground

by Alexey Ryazhskikh

JavaScript

var xxx = ["123", "321", ""];

var result = xxx.filter(x => !!x);
console.log(result);