2

I have noticed that you can't post a JSFiddle link without providing code, this is fine.

Earlier today I had posted this, then proceeded to verify that my answer was really true. I then wanted to edit it because the last sentence was false, only to find that I couldn't anymore edit my question, stating that code needs to be added with a JSFiddle link. And I didn't want to add the code from JSFiddle as this would of been a copy paste from the OP's question.

I tried this to replicate what happened :

  1. An answer is posted with a JSFiddle link and a " ` " formatting for a command (nothing close to actual code).

    First post

  2. Then I proceed to remove the sentence including the formatted command:

    Edit (Dummy link)

    Why is this possible? Shouldn't there be at least a number of lines minimum for a code? Or even better, just suggest to add the code...

1 Answer 1

4

I'm going to answer your question in two parts.

  1. The example you provided in this question.

    That's a horrible answer, and the original answers abuses backticks in order to bypass the code requirement. So yes, when you edit it, it should still require code. While JSFiddle may be a trustworthy source, fiddles have gone missing in the past and have rendered answers such as these completely useless.

    Shouldn't there be at least a number of lines minimum for a code?

    Ummm, no. Why would we do that? So people can paste only a fiddle link and then not worry about the code because there's only one word/line in their answer? The code is a requirement because it completes the answer. It really isn't an answer without it, and is subject to deletion by the community if not corrected.

  2. The actual answer your posted.

    Your example here is not representative of the answer you actually posted to that question. You provide a JSFiddle link to prove that the OP's code does work. I agree with you, posting code in that situation is not useful. So what's the solution? Remove the link from the answer, like you did. Saying "it works for me" is never an answer to a question. It's a good reason to close the question. That link belongs in a comment on the question, as a request for clarification of the problem and how to reproduce it.

    In this case, you eventually were able to reproduce the problem and clarify your answer, with no actual need for that JSFiddle link. That's great.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .