Tips on writing a question

How to write a good question

Put effort into your question

If you don’t put effort into your question why should people put effort into answering your question?

Sharing code

There are 2 good ways to share code.

  1. Copy and paste it and make sure to format the code

  2. Share a link to a reply, gist, codepen, etc.

Cant I just share a screenshot?

No, you should not. When in screenshots it’s impossible to debug your code.

One of the first things answerers do when examining a question’s code for errors is to try compiling (if necessary) and running the code to see what happens. Answerers may also copy part of the code to paste into search engines in order to learn about the types or algorithms being used, and to find other related material. When answerers are presented only an image of code, this process becomes much more difficult.

From I downvoted because

What have you tried?

Include what you have tried to fix the problem. This is part of the first part of putting effort into your question. And it will save time for people that answer since they won’t need to go through the stuff you have already tried.

What should a title be

Your title should be short but detailed. For example, you should not write:

I am having trouble with Javascript

You should write

Error when trying to compare a string to a number in a conditional