Replace First Item In Array Javascript Function Practice