Javascript Array Remove via filter()
function removeChars(element,index,array) { return (element !== "**"); } let charSet = new Array("**","bb","cd","**","cc","**","dd","**"); let newArray = charSet.filter(removeChars); console.log(newArray);/*from w w w . j a va2 s . c om*/