Generate An Array Javascript Function Examples