title: SCRIPT438: Object doesn't support property or method 'endsWith' in IE10
body: <p>I have a below function which works fine in Chrome but its giving the below error in IE10
  <code>SCRIPT438: Object doesn't support property or method 'endsWith'</code></p>
  
  <pre><code>function getUrlParameter(URL, param){
      var paramTokens = URL.slice(URL.indexOf('?') + 1).split('&amp;');
      for (var i = 0; i &lt; paramTokens.length; i++) {
      var urlParams = paramTokens[i].split('=');
      if (urlParams[0].endsWith(param)) {
          return urlParams[1];
      }
    }
  }
  </code></pre>
  
  <p>Can someone tell me whats wrong with this function?</p>