Instead of having a huge chunk of code about a whole snippet, like this:
why not have a much more concise and cleaner answer, with support for different languages too. Currently as you can see there is html too. And unnecessary comments are annoying.
The explanation only exists for YOU to understand the code, it does not exist to remain in the code as comments, sure a link might help if you're working on open source projects and other people need to understand this too.
So a snippet featuring the explanation and having the code isolated with accordance to each answer would be better.(kind of how DuckDuckGo) does it.
Here's an example: