RYAN INTERNATIONAL SCHOOL
COMPUTER REVISION WORKSHEET
CH-7-Javascript
Name _____________ Class VII Section _____ Date _______________
I. Multiple Choice Questions (MCQs)
1. JavaScript is primarily used for:
a) Styling web pages c) Database management
b) Adding interactivity to web d) Operating systems
pages
2. Which symbol is used for single-line comments in JavaScript?
a) <!-- --> c) #
b) // d) **
3. Which of the following is NOT a JavaScript data type?
a) String c) Integer
b) Boolean d) Object
4. Which keyword is used to declare a variable in JavaScript?
a) var c) declare
b) int d) string
5. JavaScript code is executed by the:
a) Web server c) Database
b) Browser d) Compiler
II. Fill in the Blanks
1. JavaScript is a ____________________ side scripting language.
2. The ___________________ method is used to display output in the browser
console.
3. Variables in JavaScript can be declared using var, let, and
__________________.
4. JavaScript statements end with a _________________________.
5. The ___________________ function displays a message box to the user.
III. Match the Following
Match Column A with Column B:
A 1. String - B 1. True/False values
A 2. Boolean - B 2. Text data
A 3. Number - B 3. Collection of elements
A 4. Array - B 4. Numeric data
A 5. Function - B 5. Block of reusable code
IV. True or False
1. JavaScript is the same as Java. (__________________)
2. JavaScript can change HTML content dynamically. ((__________________))
3. In JavaScript, arrays can hold multiple types of values.
((__________________))
4. The keyword 'int' is used to declare variables in JavaScript.
((__________________))
5. JavaScript can be embedded inside an HTML document.
((__________________))
V. Short Answer Questions
1. What is JavaScript mainly used for?
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
________________________
2. Explain the difference between var, let, and const.
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
________________________
3. Give an example of a JavaScript function.
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
________________________
Answer Key class 7 JAvascript
I. MCQs: 1-b, 2-b, 3-c, 4-a, 5-b
II. Fill in the blanks: 1-client, [Link], 3-const, 4-semicolon (;), 5-
alert
III. Match the following: String-Text data, Boolean-True/False values,
Number-Numeric data, Array-Collection of elements, Function-Block of
reusable code
IV. True/False: 1-False, 2-True, 3-True, 4-False, 5-True
V. Short Answers:
1. JavaScript is mainly used for making web pages interactive and
dynamic.
It allows developers to add features like animations, form validation,
pop-ups, sliders, and real-time updates directly in the browser.
2. Here’s the difference between var, let, and const in JavaScript:
var → Function-scoped, can be redeclared and updated.
let → Block-scoped, can be updated but not redeclared in the
same scope.
const → Block-scoped, must be initialized at declaration, and its
value cannot be reassigned.
3. Here’s a simple example of a JavaScript function:
function greet() {
alert("Hello, welcome to JavaScript!");
👉 When this function is called using greet();, it will display a pop-up
message saying “Hello, welcome to JavaScript!”.