Answers for "how to get perticular 5 string element out of 10 from array javascript"

0

how to get perticular 5 string element out of 10 from array javascript

const items = ['a', 'b', 'c', 'd', 'e', 'f']
const valuesToRemove = ['c', 'd']
const filteredItems = items.filter(item => valuesToRemove.includes(item))
// ["a", "b", "e", "f"]

console.log(filteredItems)
Posted by: Guest on May-06-2021

Code answers related to "how to get perticular 5 string element out of 10 from array javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language