Push Values Into Empty Array Javascript Function