Codecademy doesn't accept my right code


Iam at the .remove(); but codecademy doesn't accept it and my code is right

Instructions:Go ahead and .remove() your <p> tag from the HTML document.

My code

    var $p = $('<p>My text</p>')

It works and the p has been removed but codecademy doesn't accept
Errors:Oops, try again. Make sure you remove your <p> using the .remove() function.
is there anything wrong here


normally that would work, but for this exercise to work you need to use $("p") or $('p') to select the paragraph element, the exercise doesn't allow the use of a variable


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.