title: Check if string ends with any of multiple characters
body: <p>How would I check to see if a string ends in any one of multiple characters? Currently this code returns false, even though the string ends in a question mark.The properly working code would return true if the string ends in either a period, exclamation mark, or question mark, and return false if its last character is anything else.</p>
  
  <p>Obviously I could check these conditions independently but suppose I had a very long list, surely there is a better way?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function myFunction() {
      var str = "Hello?";
      var n = str.endsWith(".", "!", "?");
      document.getElementById("demo").innerHTML = n;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button onclick="myFunction()"&gt;Try it&lt;/button&gt;
  
  &lt;p id="demo"&gt;&lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>