The stated question was off topic, so I went ahead and deleted the answers (not just yours) to that version and left alone the ones that might plausibly be valid if merged into the duplicate or if the question were edited and reopened. I don't always do this kind of cleanup, but in this case both of those were plausible next steps, and this is the kind of question that I've seen attract lots of answers like that, including in comments after closure. I wanted to try to avoid it becoming a mess, and have it in a good state in case of those next steps.
It's not like these are serious rule violations or anything, but generally if you find yourself answering an off topic question you might want to think twice. We don't really want to encourage people to ask them and hope to get a few answers before it's closed, and depending on voting, the whole question may end up automatically deleted anyway. (It won't in this case, because it's closed as a duplicate.)
So in the future you might consider voting to close instead of posting that answer, or if for whatever reason you don't want to cast that vote, just moving along. This practice is supported by:
- Should I answer off-topic questions? on network-wide meta (answer: no)
- The close vote privilege help: "Closing is a democratic voting process where the community identifies questions that duplicate existing content, are unreasonable to answer in their current state, or do not belong on the site." If the question is a duplicate, answers belong on the original; if the question is unreasonable to answer it shouldn't be answered, and if the question doesn't belong on the site neither do the answers.
We don't generally strictly enforce this, but it is certainly better for the site if things are closed before they attract answers. And in this case, as noted above, I thought the question might get reopened, or answers might get merged, and in either case we wouldn't want the answers to the off-topic version of the question.