const a = ["123",12,new String("23333")] console.log(a.filter((x)=>{ return typeof x==="string" || x instanceof String }))