Works or B0rks? ``` function f(){ console.log(this); } const x = {f} // Direct f(); // undefined // Indirect (0, x.f)() // undefined // Optional chain x?.f() // x // Ok, now you! x.f?.() // ? x?.f?.() // ? const y = {g: function(){ return f; }} y?.g()() // ? y?.g()?.() // ? ``` (strict mode!)
0 reposts1 like