title: Using the Javascript slice() method with no arguments
body: <p>I'm currently reading through this <a href="https://github.com/RobinHerbots/jquery.inputmask">jquery masking plugin</a> to try and understand how it works, and in numerous places the author calls the <code>slice()</code> function passing no arguments to it. For instance here the <code>_buffer</code> variable is <code>slice()</code>d, and <code>_buffer.slice()</code> and <code>_buffer</code> seem to hold the same values.</p>
  
  <p>Is there any reason for doing this, or is the author just making the code more complicated than it should be?</p>
  
  <pre><code> //functionality fn
   function unmaskedvalue($input, skipDatepickerCheck) {
       var input = $input[0];
       if (tests &amp;&amp; (skipDatepickerCheck === true || !$input.hasClass('hasDatepicker'))) {
           var buffer = _buffer.slice();
           checkVal(input, buffer);
           return $.map(buffer, function(element, index) {
               return isMask(index) &amp;&amp; element != getBufferElement(_buffer.slice(), index) ? element : null; }).join('');
      }
      else {
          return input._valueGet();
      }
  }
  </code></pre>