Thanks so much for your expanded answer!
It really helps, I didn't even realize last() didn't accept any arguments, hence why I was putting 'p' inside the parentheses.
To be honest, not entirely sure what I was trying to do with that DOM crawl. My thinking may have been: "I don't know how to refer to the 'p' I added with a specific class or id, so, perhaps I need to crawl back out from the item I can point to, and try to find the 'p' that way, not realizing that I couldn't pass an argument to the last() function.
I think that you have given enough feedback that I could target the div I want (if its last or first), but what if its the third 'p' element out of 4?
work to remove the 3rd 'p'?
If that would work, what if there were 15 elements? and I wanted to remove the 7th? I mean, I can't see repeating last().prev().prev() with six more prev() being the most effective way to target like that.
Though I am too new to programming to be able to execute something like this, i could envision a loop whereby subsequent 'p' elements are created with newClass('classX') and each new 'p' receives an X value one larger than the previous. But, I can't see how I would introduce a variable into that class assignment function.
does that question make any sense?