Small improvements in javascript.
Add Array.forEach.