I saw JSHint and JSLint recommended to catch syntax errors, but I don't understand why they don't like this code:
var s = "hello world!"; // A string
var word = s.substring(s.indexOf(" ") + 1, s.length); // Use string properties
Here's the report:
Line 3: document.write(word);
document.write can be a form of eval.
Why is document.write() wrong, and what else should I use to simply output something to the browser?