JSFiddle - React, Tailwind, and code Playground
JavaScript
const terms = [];
const id = 2;
if ( ! terms.length ) {
console.debug("needs default");
}
if ( terms.indexOf( id ) !== -1 ) {
console.debug("found one");
}
const terms = [];
const id = 2;
if ( ! terms.length ) {
console.debug("needs default");
}
if ( terms.indexOf( id ) !== -1 ) {
console.debug("found one");
}