Regarding step 3, one immediate question and then a follow up question later.
First, with reference to the script offered in the example, see below (provided script #1), I've read how the text method can be used to collect the contents of an element when a selector is referenced AND when an argument is NOT included. (note #1)
Also read was that when an argument is passed to the text method (note #2), the text method acts to inject the contents of the argument into the selector.
So in the script offered, (provided script #1), it appears that we're inserting the value of the variable; comment, into an unspecified list element and then storing that into a variable; html. No doubt I'm miss-interrupting this, can someone clarify what is going on in the script; (provided script #1)?
provided script #1 var html = $('<li>').text(comment); note #1 var listContents = $('<ul>').text(); note #2 var someText = "Hello"; $('.aClass').text(someText);