explain about this code jquery : <p>I found this code to get value from scan barcode</p>

<pre><code>$(document).ready(function() {

    $(document).focus();

    var coba=[];
    $(document).on('keypress',function(e){
        coba.push(String.fromCharCode(e.which));                                    
        if (coba[coba.length-1]=="\r") {
          console.log(coba.join(''));  
          simpan(coba.join(''));
          coba = [];
        };
    }); 
});
</code></pre>

<p>anyone can explain about it?</p>
