You must declare all memory at the beginning of your code blocks to be jslint compliant. So var allmonth;
should be part of the var at the very beginning. Like so
var oldvartitle2 = variant.title,
oldvartitle = oldvartitle2.substring(oldvartitle2.indexOf(":") + 1),
newvartitle = oldvartitle.substr(3),
splitted = newvartitle.split(' '),
month2 = splitted[1],
allmonth;
You must also remove the var from the other allmonth
variables.
Similarly with allmonths
.