Oracle Loop Through Array Javascript Function Practice