0% found this document useful (0 votes)
26 views

CSS Paper 2

The document contains 6 questions regarding JavaScript and client-side scripting. Question 1 divides a code sample into its HTML and JavaScript components and explains the role of each. The HTML defines the document structure and content, while the JavaScript contains a script to display an alert. Questions 2 through 6 contain various sub-questions testing knowledge of JavaScript concepts like variables, methods, frameworks and more. They ask the test taker to explain or provide code samples demonstrating their understanding.

Uploaded by

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

CSS Paper 2

The document contains 6 questions regarding JavaScript and client-side scripting. Question 1 divides a code sample into its HTML and JavaScript components and explains the role of each. The HTML defines the document structure and content, while the JavaScript contains a script to display an alert. Questions 2 through 6 contain various sub-questions testing knowledge of JavaScript concepts like variables, methods, frameworks and more. They ask the test taker to explain or provide code samples demonstrating their understanding.

Uploaded by

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

Q1.

(10 marks)
Divide the following code into HTML and JavaScript components and explain
the role of each component.
<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
</head>
<body>
<h1>Welcome to my page!</h1>
<script>
alert("Hello, world!");
</script>
</body>
</html>

Q2. (12 marks)


Attempt any four sub-questions from the following:
a. What is the difference between `let` and `var` in JavaScript?
b. Explain the use of `getElementById()` method in JavaScript.
c. Write a JavaScript program to display the current date and time.
d. What is the Document Object Model (DOM)? Explain its significance in
client-side scripting.
e. Explain the use of cookies in client-side scripting.
f. Write a JavaScript program to validate a form.

Q3. (12 marks)


Attempt any four sub-questions from the following:
a. What is AJAX? Explain its significance in client-side scripting.
b. Explain the use of jQuery in client-side scripting.
c. Write a JavaScript program to create a slideshow.
d. What is JSON? Explain its significance in client-side scripting.
e. Explain the use of Bootstrap in client-side scripting.
f. Write a JavaScript program to create a calculator.

Q4. (12 marks)


Attempt any four sub-questions from the following:
a. What is AngularJS? Explain its significance in client-side scripting.
b. Explain the use of ReactJS in client-side scripting.
c. Write a JavaScript program to create a dynamic table.
d. What is the difference between synchronous and asynchronous JavaScript?
e. Explain the use of local storage in client-side scripting.
f. Write a JavaScript program to create a clock.

Q5. (12 marks)


Attempt any three sub-questions from the following:
a. What is the difference between `==` and `===` in JavaScript?
b. Explain the use of `this` keyword in JavaScript.
c. Write a JavaScript program to create a simple game.
d. Explain the use of `map()` method in JavaScript.
e. Explain the use of `reduce()` method in JavaScript.

Q6. (12 marks)


Attempt any three sub-questions from the following:
a. What is the difference between `slice()` and `splice()` methods in
JavaScript?
b. Explain the use of `filter()` method in JavaScript.
c. Write a JavaScript program to create a simple animation.
d. Explain the use of `sort()` method in JavaScript.
e. Explain the use of `forEach()` method in JavaScript.

You might also like