fix Issue 12409 - Add "each" function as found in Ruby and jQuery