title: How To Pass Parameter in javascript find function?
body: <p>Hie,</p>
  
  <p>I have a json object which have a id field:</p>
  
  <pre><code>document = {
               id: 'some value',
               ...
             }
  </code></pre>
  
  <p>And a list to store this documents.</p>
  
  <pre><code>var list = [{document}, {document} ...]
  </code></pre>
  
  <p>Now I am trying to call javascript find() function on the list to return the document with a specific id as</p>
  
  <pre><code>list.find( document, id) =&gt; {
     if (document.id == id)
     return id
  }
  </code></pre>
  
  <p>But its not working. I checked and found that the id parameter value is not what I am passing but the index value of the document in the list. I tried changing the name hoping it was a error with keyword but the sae result.</p>
  
  <p>So, How do I pass a custom parameter to the find function?</p>