A question involving a misunderstanding of how setTimeout()
works in Node.js was posted.
Though the question is very basic, it seemed both on-topic and clear to me so I provided an answer. For me, the clarity came from this sentence: "I want that test should return "Hello World" but it is returning empty string". The OP stated their expectation, showed a minimal reproducible example and then included what is happening instead.
Another similar answer was posted. Then, within minutes, both our answers were downvoted multiple times and the question got a couple of close votes for needs details or clarity.
Am I missing something here? Is this kind of question not allowed on Stack Overflow? Are answers to this type of question not appropriate?