I have the following unordered list in my DOM. I am currently searching for a method, that can delete a specific list item using Javascript.
<ul class="list">
<li id="1">Depy</li>
<li id="2">HI</li>
<li id="3">WA</li>
<li id="4">FA</li>
</ul>
I am creating a function in JS, which accepts a string argument. For example "FA" and then it is supposed to delete find and delete list items containing string in their content.
To Sum up I want to delete by specific list element by if it has a matched string in content.