Question: Question 5 2 pts Given this JavaScript code in an HTML page... var componenti = MakeComponent(bat, 100); var component2 = MakeComponent(ball, 50); componenti.aqty(11); component2.stockId =

 Question 5 2 pts Given this JavaScript code in an HTMLpage... var componenti = MakeComponent("bat", 100); var component2 = MakeComponent("ball", 50); componenti.aqty(11);

Question 5 2 pts Given this JavaScript code in an HTML page... and this code in MakeComponent.js: = = function MakeComponent(istockid, iqty) { var comp = document.createElement("div"); comp.stockId = istockid; var qty = iQty; comp.sStockId = function (newid) { comp.stockId = newid; show(); }; comp.aqty = function (newoty) { qty = qty = newQty; show(); }; function show() { comp.innerHTML = label(); } var label = function () { return "id:" + comp.stockId = "qty:" + aty; }; comp.print - function ({ console.log(label(); }; show(); return comp; } What would you see in the browser's console, when the page rendered? What would you see in the browser's console, when the page rendered? Inspect id:bat qty: 100 id:ball aty: 50 id:bat qty: 111 id:ball aty:50 id:bat aty: 100 id:ball gty: 61 some kind of run time error. none of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!