Multiple Conditional Controllers

Yes – it looks like the variables you intended to create are just being reassigned each call. You should scope the variables to to the function using var before each: var conditions, toggleControl; // here. conditions = condition_toggled.split(‘,’); toggleControl = function toggleControl(value) { conditions.forEach(function(condition) { var cond_display_control, controllers; // here. //this will get the condition … Read more