douglascrockford/JSLint — Issue #105: Question
Author: dtrue
Created: 2012-02-23 18:57:58+00:00
State: open

Hi Doug,

I'm a huge fan and just recently went through your videos and good parts book. I'm going back through doing the code examples. I think there is a weird issue with jslint interpreter/website. For some reason the code below will work sometimes and other times I can recheck and it doesn't work right after. I'm a noob but without even modifying the code in the window it will fail the second time it's checked.

//Error says " Combine this with the previous 'var' statement." I've noticed inconsistencies...with the text box adding a character or reformatting so not sure if something is going on. I also indent the that.value one more time and that seems to occasionally work until I hit refresh!

//...snippet
myObject.dub = function () {
"use strict";
var that = this;
var helper = function () {
that.value = add(that.value, that.value);
};
helper();
};

//2. Second jslint check to indent that.value
//Error says " Combine this with the previous 'var' statement."
//...snippet
myObject.dub = function () {
"use strict";
var that = this;
var helper = function () {
that.value = add(that.value, that.value);
};
helper();
};

Thanks in advance!