phetsims / gene-expression-essentials

An educational simulation about how genes work to create proteins.
GNU General Public License v3.0
4 stars 6 forks source link

replace usages of _.forEach #42

Closed jbphet closed 7 years ago

jbphet commented 7 years ago

I'm seeing a number of usages of _.forEach instead of the native JS forEach function. We should use the latter if we can. If there is a good reason to use the lodash version, feel free to enlighten me. A search of the code shows 21 usages for this sim.

Example from ManualGeneExpressionModel:

      _.forEach( this.offLimitsMotionSpaces, function( offLimitMotionSpace ) {
        if ( bounds.intersectsBounds( offLimitMotionSpace ) ) {
          // bounds.subtract( new Area( offLimitMotionSpace ) ); TODO
        }
      } );
aadish commented 7 years ago

fixed closing