Hello

I'm learning JavaScript by reading "The Definitive Guide".

I saw JSHint and JSLint recommended to catch syntax errors, but I don't understand why they don't like this code:

Code:
var s = "hello world!"; // A string
var word = s.substring(s.indexOf(" ") + 1, s.length); // Use string properties
document.write(word);
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?

Thank you.