Matching partial text to array elements
<p>I'm trying to slice string value of the current counter to do a partial match, is there a better way to match partial text to various array elements</p>

<pre><code>var autoList = [];

for (i = 0; i &lt;= lang.length; i++) {

        if (entered.value === lang[i].slice(0, entered.value.length)) {
            autoList.push(lang[i]);
        }

    };
</code></pre>
