I\'m trying to filter an array that contains a bunch of urls. I need to return the urls that only contain the word \"contact\".
For example there is a link htt
htt
var links = ["https://www.example.com/v1/contact-us/ca", "https://www.example.com/v1/contact-us/sanjose", "https://www.example.com/v1/meeting-us/ca"]; var newlink = links.filter(function(link){ return link.includes("contact") }); console.log(newlink)
Try this. It should work.