C Push Into Array Javascript Function