While Loop Structure Javascript Array Contains