I tried to implement flood-fill for a JavaScript project I am working on. I found out quickly that recursion was NOT the best way to do this.