Modern Application Development II, End Term
Consider the below HTML document.
index.html:
<table id ="table_id"> <tr> <th>Name</th> <th>Standard</th> </tr>
<tr> <td id = "cell_id_1">Abhishek</td> <td id = "cell_id_2">10th</td> </tr> <tr> <td id = "cell_id_3">Narendra</td> <td id = "cell_id_4">11th</td> </tr></table>
<script>document.getElementById("table_id").addEventListener("click", () =>console.log("Table Clicked !!"), true);
document.getElementById("cell_id_1").addEventListener("click", () =>console.log("Cell Clicked !!"), true);</script>Suppose you open the “index.html” file in a browser, and click on the table cell with the text “Abhishek”. Which of the following shows the correct sequence of output?
Consider the below HTML document. index.html: <table id ="table_id"> <tr> <th>Name</th> <th>Standard</th> </tr> <tr> <td id = "cell_id_1">Abhishek</td> <td id = "cell_id_2">10th</td> </tr> <tr> <td id = "cell_id_3">Narendra</td> <td id = "cell_id_4">11th</td> </tr> </table> <script> document.getElementById("table_id").addEventListener("click", () => console.log("Table Clicked !!"), true); document.getElementById("cell_id_1").addEventListener("click", () => console.log("Cell Clicked !!"), true); </script> Suppose you open the “index.html” file in a browser, and click on the table cell with the text “Abhishek”. Which of the following shows the correct sequence of output? Consider the below HTML document. index.html: <table id ="table_id"> <tr> <th>Name</th> <th>Standard</th> </tr> <tr> <td id = "cell_id_1">Abhishek</td> <td id = "cell_id_2">10th</td> </tr> <tr> <td id = "cell_id_3">Narendra</td> <td id = "cell_id_4">11th</td> </tr> </table> <script> document.getElementById("table_id").addEventListener("click", () => console.log("Table Clicked !!")); document.getElementById("cell_id_1").addEventListener("click", () => console.log("Cell Clicked !!")); </script> Suppose you open the “index.html” file in a browser, and click on the table cell with the text “Abhishek”. Which of the following shows the correct sequence of output? Consider the following JavaScript program, and predict the output if executed. var first = 1; obj1 = { 'first' : 2, 'second' : function some () { console.log(this.first); } } obj2 = { 'first' : 3, 'second' : function some () { console.log("Function Invoked !!"); this.second(); } } obj2.second.call(obj1);