How does the jq loop bind the click event, and the this can point to the event itself?

<body>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
</body>

if you bind all the div events under the body and point to the bound div itself, ask the seniors to explain that the native events will

var a = document.getElementsByTagName("body")[0].children
        for(let i =0;i<a.length;iPP){
            a[i].addEventListener("click",function(){
                console.log(this)
            })
        }
Jun.03,2021

$('body').on('click','> div',function(){
    console.log(this)
})

$('body div').on('click', function () {
    console.log(this);
})
Menu