Add First Element In Array Javascript Iterations In C