Skip to content

Commit

Permalink
Warn about 0-index return value being falsy (#889)
Browse files Browse the repository at this point in the history
  • Loading branch information
randycasburn committed Jan 4, 2021
1 parent 2fd1f6c commit c1bf1a3
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ <h3 id="Parameters">Parameters</h3>
<h3 id="Return_value">Return value</h3>

<p>The <strong>value</strong> of the <strong>first element</strong> in the array that satisfies the provided testing function. Otherwise, {{jsxref("undefined")}} is returned.</p>
<p class="warning">Index <code>0</code> will be interpreted as a {{Glossary("Falsy")}} value in conditional statements.</p>

<h2 id="Description">Description</h2>

Expand Down

0 comments on commit c1bf1a3

Please sign in to comment.