javascript: optimize in conditions
javascript: optimize calling apply on lambdas