I'm here referring to Q: Adding Sleep command to shell script?. It received a downvote most likely because the answer was easy, and then received an upvote, which was probably a mercy vote. Is there somewhere valid reasons for voting, or is any reason okay, so long as one dislikes a post (for whatever reason)?
George is right that pretty much any downvote reason is valid, since the system allows people to use the votes they've earned as they please. Based on your title, I suspect that you were asking for opinions on what people should do, though.
Personally, I would never downvote, or vote to close delete, for that matter, just because a question is easy to answer. The repeatedly stated goal of Stack Exchange — well, one of them, anyways — is to be the Internet's number one repository of answers to all real, on-topic questions. Not just the difficult questions; all questions.
Back when Meta was just getting started, there was a meme about moving turtles in LOGO. It was based on this question, which was asked by none other than Joel Spolsky. Now, Joel probably knows how to use LOGO, and I guarantee you he knows how to Google directions for doing so. The point of that question was to reinforce the concept that no question is "too newbie" for Stack Overflow, or any other Stack Exchange site.
Unfortunately, many "answer too easy" questions have other problems. In some cases, they're not real questions based on the SE definition of "real." In others, they're so poorly worded that they're truly impossible, not just difficult, to understand. In those cases, I will downvote. But that's correlation, not causation.
Any reason to downvote is 'valid', in that the site allows it.
It's also valid to upvote an answer that's been downvoted because you don't think it should be downvoted.
If people have a problem with it, the upvotes will more than compensate for the downvotes given.
I just want to disabuse the notion that this is an "easy" question. I've seen such functions called
My point is that the "ease" of a question is in the eye of the beholder. Even if you can answer it off the top of your head now, every one of us was ignorant of that answer at one point or another in our careers, and some of us would have had to look it up anyway because we don't remember which of the dozens of syntaxes we have learned over the years is the correct one in this case. It's a real question, clearly worded as a bonus, and it deserves a real answer.