Add uniqui item to the array
MOHSIN ALI SOOMRO
Posted on July 7, 2021
code
const handleQualityChange=(e)=>{
if(quality.find((i:any)=>i===e.target.value)){
const index = quality.indexOf(e.target.value)
quality.splice(index,1)
console.log({quality})
}else{
quality.push(e.target.value)
console.log({quality})
}
}```
💖 💪 🙅 🚩
MOHSIN ALI SOOMRO
Posted on July 7, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.