Question: I hava a list of sings: 

```
var sings = [",",".",":","!","?"]

```

How do I check if a word contains one of these signs and return it?

For example:

```
"But,"

return ","

"Finished."

return "."

"Questions?"

return "?"

```

Answer: 
You could solve that with a regular expression:

```js
function match(input) {
  var regex = /([,\.\:!\?])/;
  var matches = input.match(regex);
  return matches ? matches[0] : false;
}

console.log(match("foo?"));   // "?"
console.log(match("bar."));   // "."
console.log(match("foobar")); // false
```
You can use `filter()` and `indexOf()` and return array of signs that are found in string.

```js
var signs = [",",".",":","!","?"];
function check(str, arr) {
  return arr.filter(function(e) {
    return str.indexOf(e) != -1
  })
}

console.log(check("But,", signs))
console.log(check("Finished.", signs))
```