Next up I thought I would take a snippet from the linked stackoverflow discussion and see what JSLint made of it:
127.0.0.1.toInt();
And... it complained
So I did this:
var = function() {
127.0.0.1.toInt();
}
And it complained (yes, there's a typo)
var foo = function() {
127.0.0.1.toInt();
}
And... it 'compiles' fine, no complaints. So I thought I'd push the syntax tree button to see what was going on and it tells me:
Tree:
""
Which is less than spectacularly useful.
Oh, I went back and hit the JSLint button again and now it givess me lots of errors for the above code.
Including, but not limited to complaining that 127 occurs in column 1 instead of column 9. But then I try to enter a tab at the start of the line to achieve proper indentation... and of course it doesn't work because it is in the browser and so tab just goes and selects the next control.
Sensational.
If I had to enter all my indentation as spaces, by hand, I'd conclude that the Professor teaching this was a colossal idiot.