Transform Object Into Array Javascript Function Practice