Create A New Array From Existing Array Javascript Function How To Use