[Q.1] - (function() { return (() => this.x).bind({ x: ‘inner’ })(), (() => this.x)() }).call({ x: ‘outer’ });
I don’t understand this question and how it’s working. please explain.
[Q.2] - function constfuncs() { var funcs = []; for(var i = 0; i < 10; i++) funcs[i] = function() { return i; }; return funcs; } var funcs = constfuncs(); funcs5 What does the last statement return ?
It should return 4 because there in the array of “funcs” at index of 5 there will be 4.
[Q.3] - function f(){ return f; } new f() instanceof f; What is the output?
Please explain.