Ruby Remove Value From Array Javascript Methods And Functions