hey shadi! i wanted to write the function out without using enumerables. I guess it uses the all method, but i think its ok for the error handling. 
Although, now that i think of it, i suppose i can write an enumerable friendly version here (since we have them available in ruby) and port this version over to the javascript one.

let me know what you think