<p dir="auto">Challenge <a href="https://www.freecodecamp.com/en/challenges/object-oriented-and-functional-programming/filter-arrays-with-filter" rel="nofollow">filter-arrays-with-filter</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="

var oldArray = [1,2,3,4,5,6,7,8,9,10];

// Only change code below this line.

var newArray = oldArray.filter(function(val){
return val &lt; 6;
});


    ```
"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">oldArray</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">,</span><span class="pl-c1">3</span><span class="pl-kos">,</span><span class="pl-c1">4</span><span class="pl-kos">,</span><span class="pl-c1">5</span><span class="pl-kos">,</span><span class="pl-c1">6</span><span class="pl-kos">,</span><span class="pl-c1">7</span><span class="pl-kos">,</span><span class="pl-c1">8</span><span class="pl-kos">,</span><span class="pl-c1">9</span><span class="pl-kos">,</span><span class="pl-c1">10</span><span class="pl-kos">]</span><span class="pl-kos">;</span>

<span class="pl-c">// Only change code below this line.</span>

<span class="pl-k">var</span> <span class="pl-s1">newArray</span> <span class="pl-c1">=</span> <span class="pl-s1">oldArray</span><span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">val</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-s1">val</span> <span class="pl-c1">&lt;</span> <span class="pl-c1">6</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>


    <span class="pl-s">``</span>`</pre></div>
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/en/challenges/object-oriented-and-functional-programming/filter-arrays-with-filter" rel="nofollow">filter-arrays-with-filter</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">Using the code below and it should be working but getting error message: "You should only be using filter to make the new array."  I have searched and this is the correct code so I don't know what the problem is..</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="

var oldArray = [1,2,3,4,5,6,7,8,9,10];

// Only change code below this line.

var newArray = oldArray.filter(function(val) {
return val &lt;= 5;
});

    ```
"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">oldArray</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">,</span><span class="pl-c1">3</span><span class="pl-kos">,</span><span class="pl-c1">4</span><span class="pl-kos">,</span><span class="pl-c1">5</span><span class="pl-kos">,</span><span class="pl-c1">6</span><span class="pl-kos">,</span><span class="pl-c1">7</span><span class="pl-kos">,</span><span class="pl-c1">8</span><span class="pl-kos">,</span><span class="pl-c1">9</span><span class="pl-kos">,</span><span class="pl-c1">10</span><span class="pl-kos">]</span><span class="pl-kos">;</span>

<span class="pl-c">// Only change code below this line.</span>

<span class="pl-k">var</span> <span class="pl-s1">newArray</span> <span class="pl-c1">=</span> <span class="pl-s1">oldArray</span><span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">val</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-s1">val</span> <span class="pl-c1">&lt;=</span> <span class="pl-c1">5</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

    <span class="pl-s">``</span>`</pre></div>