Also in the case of the author, who was looking for about the second most basic Javascript method there is, the result seemed appropriate. He didn't even have to click the page, the info was right there in front of him.
Don't get me wrong though, I do agree that their different subdomains are a wrong thing to do, and I fully agree if Google decides to punish them by blocking/lowering results for *.w3schools.com for a couple months. I also agree that the Mozilla Developer Network may be a much better resource, both for newbies and professionals. But if you are that much against W3Schools, why don't you use the search function of MDN instead of Google's general search?