Question Pack
Published by: Anil K. Panta
Very Short Answer Questions
Define client-side scripting.
What is the difference between var, let, and const in JavaScript?
Write the syntax for creating a function in JavaScript.
How do you declare and initialize an array in JavaScript?
Explain the purpose of the document.getElementById() method.
What is an event listener? Give one example.
List any two data types supported by JavaScript.
Mention two advantages of using JavaScript in web development.
What is the difference between == and === operators?
How can you include an external JavaScript file on an HTML page?
Descriptive Answer Questions
Explain the Document Object Model (DOM) with suitable examples.
Describe the different types of JavaScript events and their uses with examples.
Write and explain a JavaScript program to validate a simple HTML form (e.g., checking empty fields).
Discuss various looping statements available in JavaScript with syntax and examples.
Define objects in JavaScript. How can you create and manipulate object properties dynamically?
Long Answer
1. Design and write a complete JavaScript-based web page that:
Accepts user input through a form (name, email, and age).
Validates all inputs.
Displays a personalized message using DOM manipulation if validation passes.
Develop a mini-JavaScript application (logic + explanation) that:
Displays a dynamic image slideshow with "Next" and "Previous" buttons.
Explain the working of each function used in your code