   removeSel: (selection) ->
     index = 0
     array = @_rte.selections
-    for index in [0..array.length-1]
+    for el, index in array
       if (array[index] == selection)
         array.splice index, 1
         break


    newSel

# Class describing the Rich Text Editor type
#
class Rte

    else
      throw new Error "Invalid argument #{side}, expected 'left' or 'right'"
    index = 0
    for sel, index in array
      if sel.equals selection
        array.splice index, 1
        break

