diff --git a/docs/assets/js/src/customizer.js b/docs/assets/js/src/customizer.js index 7fd6216e62..722a039557 100644 --- a/docs/assets/js/src/customizer.js +++ b/docs/assets/js/src/customizer.js @@ -417,7 +417,7 @@ window.onload = function () { // wait for load in a dumb way because B-0 var dependencies = this.getAttribute('data-dependencies') if (!dependencies) return dependencies = dependencies.split(',') - for (var i = 0; i < dependencies.length; i++) { + for (var i = 0, len = dependencies.length; i < len; i++) { var $dependency = $('[value="' + dependencies[i] + '"]') $dependency && $dependency.prop('checked', true) } @@ -428,7 +428,7 @@ window.onload = function () { // wait for load in a dumb way because B-0 var dependents = this.getAttribute('data-dependents') if (!dependents) return dependents = dependents.split(',') - for (var i = 0; i < dependents.length; i++) { + for (var i = 0, len = dependents.length; i < len; i++) { var $dependent = $('[value="' + dependents[i] + '"]') $dependent && $dependent.prop('checked', false) } diff --git a/js/tests/index.html b/js/tests/index.html index 3234dc7a8a..d883fa50e6 100644 --- a/js/tests/index.html +++ b/js/tests/index.html @@ -42,7 +42,7 @@ 'delegate', 'undelegate' ] - for (var i = 0; i < eventAliases.length; i++) { + for (var i = 0, len = eventAliases.length; i < len; i++) { var eventAlias = eventAliases[i] $.fn[eventAlias] = function () { throw new Error('Using the ".' + eventAlias + '()" method is not allowed, so that Bootstrap can be compatible with custom jQuery builds which exclude the "event aliases" module that defines said method. See https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#js') @@ -125,7 +125,7 @@ 'test', 'throws' ]; - for (var i = 0; i < methodNames.length; i++) { + for (var i = 0, len = methodNames.length; i < len; i++) { var methodName = methodNames[i]; window[methodName] = undefined; }