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