For loop replaces while loop but line 50 doesn't work

This commit is contained in:
Sarah Ni 2015-08-31 15:25:42 +10:00
parent cdb4c50eff
commit a7258f4848
2 changed files with 3 additions and 7 deletions

View File

@ -1,7 +1,5 @@
import PageTracker from 'discourse/lib/page-tracker';
console.log(Discourse.SiteSettings.adsense_nth_post_code);
var ad_width = '';
var ad_height = '';
var ad_code = '';

View File

@ -52,13 +52,11 @@ Foo.prototype.bar = function() {
// This should call googletag.setTargeting(key for that location, value for that location)
function custom_targeting(key_array, value_array) {
var i = 0;
while (i < key_array.length) {
var custom_values = [];
var wordValue = valueParse(value_array[i])
for (var i = 0; i < key_array.length; i++) {
var wordValue = valueParse(value_array[i]);
var f = new Foo(key_array[i], wordValue, googletag);
f.bar();
i++;
console.log("works!");
}
}