Added tests and documentation for forEach.
Added some missing new statements to tests.
Added the forEach method source.