Say someone asks a question related to HTML/CSS/JavaScript (something that can be done in a code snippet). Someone answers with a line of code that solves the problem.
Is editing the answer to include a code snippet showing the solution in action 1) allowed and 2) a good idea?
I know SO doesn't want edits that don't actually change the answer. The answer here suggests adding code where none exists is OK but that's in reference to a question, not an answer. There was another similar question on Meta (though it was related to adding code to the question, sorry I can't find it now) that said the likelyhood of changing the OP's intent was too high.