Ruby Remove Element From Array Javascript Methods