0% found this document useful (0 votes)
33 views2 pages

CIE1 Set2 U19CS602 - Full Stack Development

Uploaded by

s.karansridharan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views2 pages

CIE1 Set2 U19CS602 - Full Stack Development

Uploaded by

s.karansridharan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Reg.

No

Sona College of Technology (Autonomous), Salem -5.


SET - 2 Department of Computer Science and Engineering
Continuous Internal Evaluation Test – I
U19CS602-Full Stack Development (III / VI)
OPEN BOOK TEST
Text Book, Photo copies of text book only
DATE : 20.02.2024 Marks : 50

Levels of

Course
B.T
TIME 9.15am to 10.45am Duration : 1 ½ hours
SLOT :
PART – A Answer All Questions (6 x 2 = 12 Marks)

1. Design a JavaScript program to display a message “Hi good morning to you” when a page is 8 1

loaded and displays a message “Thanks for visiting our web page” when a page is unloaded and
capture script error using event handler.

2. Consider the following React component: 4 2


import React from 'react';
class MyComponent extends React.Component {
componentDidMount() {
let i;
for (i = 0; i < 3; i++) {
const log = () => {
console.log(i);
}
setTimeout(log, 100);
}
}
render() {
return null;
}
}
export default MyComponent;
What will be logged to the console when rendering this component, and why?
3. The following recursive code will cause a stack overflow if the array list is too large. How can 5 1
you fix this and still retain the recursive pattern?
var list = readHugeList();
var nextListItem = function() {
var item = list.pop();
if (item) {
// process the list item...
nextListItem();
}
};
4. As a developer seeking to deepen your understanding of React's virtual DOM, describe and 5 2
visually represent the virtual DOM of a React application handling dynamic data.
5. How would Mutation Observer work? Discuss the advantages it offers in monitoring and 8 1

responding to changes in the DOM with suitable example.

6. Elaborate on the sequence of event propagation in the context of bubbling and capturing phases. 8 1

Provide a comprehensive explanation, including the significance of each phase and how they
contribute to the overall event flow in a browser environment.

7. What will the code below output to the console and why? 5 1

I. console.log(2 + "3" + "3");


II. console.log(2 + +"3" + "3");
III. console.log(2 + -"2" + "3");
IV. console.log(+"2" + "2" + "3");
V. console.log( "B" - "C" + "3");
8. How can you set up the React environment on your computer for deploying an application? 7 2

***************************

Bloom’s LOTS HOTS To

Percentage 0 100 1

You might also like