1

Helloo, I’m trying to understand how “bind” is working. Could you explaine me how could I use “bind” to getthe same result on both console.log(this)?

document.querySelector("h").addEventListener("click", test1);
test(1);
function test1(){
    console.log(this);
    function test2(){
        console.log(this);
    }
    test2();
}
Lux
  • 17,140
  • 4
  • 38
  • 70
nick
  • 21
  • 2

0 Answers0