Change Array Index Value Javascript Compiler