Started draft of javascript array functions