Taking a screenshot of your code, terminal, errors or anything fundamentally text-based is counter-productive for everyone involved. The reasons for this are listed below:
When you're asking for help, other users often want to copy your code into their own editing environment so they can modify the code and send back a fixed version or highlight mistakes. Posting an image means the only way to do this is to painstakingly copying the text.
Posting questions doesn't just help you, but it also helps all people in the future who search for the same question using keywords or error messages. When you post an image of text, the website itself and search engines cannot easily index the content for search purposes.
When trying to share error messages from terminals, consoles, browser tools, etc. images often cut off important parts of the message, especially with long messages.
A picture isn't always worth a thousand words. Posting an image may result in a higher cost for users on metered connections. Some users may even have images disabled completely on platforms such as Discord or Slack. Be thoughtful of those who may not have unlimited internet access.
Most platforms have settled on Markdown as the preferred formatting language:
```js (async function(){ let books = await getAllBooks(); console.log(books); })(); ```
And Stackoverflow uses 4-spaces of indentation:
(async function(){ let books = await getAllBooks(); console.log(books); })();
Hopefully this has been informative. Now whenever you're helping someone and they share an image of their code or error messages, help them anyway but direct them here so they don't make the same mistake next time!
Other similar problems: Don't Ask to Ask, Just Ask, The XY Problem, No Hello.
Further reading: How do I ask a good question?, How To Ask Questions The Smart Way.