Return First Element In Array Javascript Iteration