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,835
  • 5
  • 43
  • 73
nick
  • 21
  • 3

0 Answers0