title: IE8 shows error: "Object doesn't support this property or method" on the line that uses filter() method
body: <p>I am using this script to limit the characters on lines 1-3 on my textarea. It works in Firefox and Chrome. But in IE8, it shows an error: "Object doesn't support this property or method" on the line that uses filter() method.</p>
  
  <p><strong>Here's the code:</strong></p>
  
  <pre><code>var result = jQuery('#result');
  var my_textarea = jQuery('#mytext');
  my_textarea.on('keyup', function(event){
      var el = jQuery(this);
      var lines = el.val().split('\n').length;
      var chars = el.val().split('').filter(function(v){
          return v != '\n';
      }).length;    
      result.html('You have ' + lines + ' lines and ' + chars + ' chars');    
  
      if ((lines === 1 &amp;&amp; chars &gt; 20) || (lines === 2 &amp;&amp; chars &gt; 40) || (lines === 3 &amp;&amp; chars &gt; 60)) {
            my_textarea.val( my_textarea.val() + "\n");
      }
  });
  </code></pre>
  
  <p>How do I resolve this?</p>