addEventListenner Probleme

Hello Clever’s
I’m getting an “.addEventListener is not a function” error. I am stuck on this:

<div class="container">
            <nav class="nav">
                <div class="menu-toggle">
                    <i class="fas fa-bars"></i>
                    <i class="fas fa-times"></i>
                <a href="index.html"><img src="/images/logo.png" alt=""></a>
                <ul class="nav-list">
                    <li class="nav-item">
                        <a href="#" class="nav-link">Home</a>
                    <li class="nav-item">
                        <a href="#" class="nav-link">Menu</a>
                    <li class="nav-item">
                        <a href="#" class="nav-link">Reservations</a>
                    <li class="nav-item">
                        <a href="#" class="nav-link">News</a>
                    <li class="nav-item">
                        <a href="#" class="nav-link">Shop</a>
                    <li class="nav-item">
                        <a href="#" class="nav-link">Contact</a>

and this JS Code :cry: :sob: :sob:

    const selectElement = function (element) {
    return document.querySelector(element);
    let menuToggler = selectElement('.menu-toggle');
    let body = selectElement('body');
    menuToggler.addEventListenner ("click", function() {

but In Console Say
Uncaught TypeError: menuToggler.addEventListenner is not a function
at main.js:14
can anyone give me solution please

You have a typo, it’s just one ‘n’:

1 Like

thx bro
this is a Stupid Mistake from Beginner hhhh :rofl: :rofl: :rofl: :rofl: :rofl: :joy: