Element Not In Array Javascript Iterations