JavaScript JavaScript and the DOM Traversing the DOM Parent Traversal

Cannot move on until I answer this question, please help?

I have located the previous answers to this question yet it will not work for me, any suggestions?

const removeMe = document.querySelector("remove_me");
var parent = removeMe.parentNode;
<!DOCTYPE html>
        <title>Parent Traversal</title>
    <link rel="stylesheet" href="style.css" />
            <li class="remove_me">Good bye!</li>
        <script src="app.js"></script>

1 Answer

Kieran Barker
Kieran Barker
14,983 Points

You're missing a dot before remove_me in your querySelector. It should be a class selector :)