Set Z are all objects therefore Y

Set A: 1) Fikri Saoudi latest front end project i worked on was Rayyan https://rayyan.qcri.org/welcome which is a systematic web application to help systematic review authors perform their job in a quick, easy and enjoyable fashionMy role : as software engineer intern i have been working on adding persers to new format (Web of Science/CIW) and adding forum to a website for users to communicate in addition the testing for functional requirements. The link below include my contribution to the project https://rayyan.qcri.org/credits Technologies i used in front end development i have been using HTML and CSS (with bootstrap framework )javascript with jQuery ( library of extension and plugins)Javascript framework i used AngularJS And i’m familiar with RESTful services and APIs 2) closure in javascript is the combination of a function and the lexical environment within which that function was declared function fikri() {var name = ‘David’; function display() { alert(name); display(); } fikri(); 3) // name is a local variable created by fikri // display() is the inner function, a closure// it uses variable declared in the fikri function } The result of the code in console is 200
X and Y and Z are all objects therefore Y and Z cannot be used as indexes like in an array forX In:xy= 100 ;xz= 200 ;It only create one latest pair, it overwrite the 100 to 200x { object object : 200 }
That’s why output in console for both cases xy and xz is 200 4) output in console for Button4 is 5
Actually the output for all the Buttons is 5 because, click on any button is happening after the loop end, loop stopped at variable i =5 thes it return 5 The following code will have same output with first one for(var i =0; i <5; i++){var a = document.createElement('button'); a.appendChild(document.createTextNode('Button'+ i)); document.body.appendChild(a);} a.addEventListener('click', function(){ console.log(i);});