Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

1. In JavaScript, the typeof operator is used to determine the type of a variable.

2. JavaScript supports two types of scopes: Global scope and Local scope.

3. A function that is defined within another function and has access to its parent
function's variables is called a Closure.

4. The process of associating a function with a variable is known as Function Expression .

5. The JavaScript method used to add new elements to the end of an array is push.

6. The concept in JavaScript where a function can have access to variables from its outer
scope even after the outer function has finished executing is known as closure .

7. JSON stands for Java Script Object Notation.

8. The JavaScript function used to make asynchronous requests to a server is fetch.

9. The JavaScript method for removing the last element from an array is pop.

10. In JavaScript, the NaN stands for Not a Number.

11. The keyword used to declare a variable in JavaScript that cannot be reassigned is
const.

12. The JavaScript method for converting a string to an integer is parseint.

13. The process of defining a new type of object in JavaScript is called creating a CONSTRUCTOR.

14. The JavaScript method for converting an object to a JSON string is JSON.stringfy.

15. The event in JavaScript that occurs when the user clicks on an HTML element is called
onclick.

16. The JavaScript operator used for strict equality comparison is ===.

17. The JavaScript keyword used to declare a constant variable is const.

18. The method in JavaScript used to execute a function after a specified time interval is
setTimeout.

19. The JavaScript statement used to handle exceptions is try-catch.

20. The process of bringing a variable or function declaration to the top of its scope is known as
hoisting.

21. The JavaScript method for converting a string to lowercase is toLowerCase.

22. The global object in the browser environment is called window.

23. The JavaScript concept that allows a function to accept an indefinite number of arguments
is called rest parameters.

24. The keyword used in JavaScript to refer to the current object is this.

25. The JavaScript method for removing the first element from an array is shift.

Column A Column B
1. var name = "num1"; B. String
2. 5 + "5"; B. String
3. typeof myVar === "undefined"; C. Boolean
4. function add(x, y) { return x + y; } F. Function
5. let numbers = [1, 2, 3]; D. Array
6. const person = { name: "Alice", age: 25 }; E. Object
7. null == undefined; C. Boolean
8. console.log(typeof NaN); I. NaN
9. var isTruthy = true; C. Boolean
10. function multiplyBy(factor) { return M. Close
function (num) { return num * factor; } }
11. document.getElementById("myElement"); K. DOM
12. function Person(name, age) { this.name = T. Constructor
name; this.age = age; }
13. console.log(a); var a = 5; Q. Hoisting
14. fetch("https://api.example.com/data"); W. AJAX
15. let promise = new Promise((resolve, reject) U. Promise
=> { /* ... */ });
16. let colors = { primary: "blue", secondary: E. Object
"green" };
17. var button = J. Event
document.getElementById("myButton");
button.addEventListener("click",
function() { /* ... */ });
18. const numbers = [1, 2, 3]; const doubled = S. Operator
numbers.map((num) => num * 2);
19. let timerId = setTimeout(function() X, setTimeout
{ console.log("Timeout!"); }, 2000);
20. function greet(name = "Guest") R.Scope
{ console.log("Hello, " + name
+ "!"); }
21. if (typeof x === "undefined") { /* ... */ } G.undefined
22. let result = 10 / "abc"; I. NaN
23. var car = { make: "Toyota", model: E. Object
"Camry" };
24. let promise = new Promise((resolve, reject) U. Promise
=> { /* ... */ });
25. let greet = () => console.log("Hello, V. E56 Arrow Function
World!");

1. JavaScript is a server- side


scripting language. False
2. The "=== " operator in JavaScript
compares both value and type. True
3. The "let" keyword is used to declare a variable
in JavaScript. True
4. JavaScript is a case-sensitive language. True
5. The "this" keyword refers to the global object in
JavaScript. False
6. "NaN" stands for "Not a Number" in
JavaScript.True
7. JavaScript supports multi-line strings using
single quotes. False
8. The "splice" method can be used to add or
remove elements from an array in JavaScript.
True
9. JavaScript has built-in support for promises,
allowing asynchronous operations. True
10. The "typeof" operator in JavaScript returns a
string indicating the data type of a variable. True
11. The "try...catch" statement in JavaScript is used
for asynchronous error handling. False
12. JavaScript has a built-in function called
"sleep" to pause the execution of a script
for a specific duration. False
13. The "document.querySelector" method can be
used to select multiple elements on a web page.
False
14. In JavaScript, the "const" keyword can be used to
declare variables that cannot be reassigned. True
15. The "localStorage" object in JavaScript can store
data persistently in the browser. True
16. JavaScript has a built-in "foreach" loop for
iterating over arrays. False
17. The "JSON.parse" method in JavaScript is used
to convert a JSON string into an object. True
18. JavaScript's "call" and "apply" methods are used
to invoke a function with a specified "this" value.
True
19. The "window.onload" event in JavaScript is
triggered when the DOM has finished loading.
False
20. JavaScript has a built-in "map" function for
transforming elements of an array. True
21. The "NaN" value is equal to itself in JavaScript.
False
22. JavaScript has a native module system allowing
the organization of code into separate files. True
23. The "break" statement in JavaScript is used to
terminate a loop. True
24. The "fetch" API in JavaScript is used for making
asynchronous HTTP requests. True
25. JavaScript supports both functional and object-
oriented programming paradigms. True

1. What is the purpose of JSON Web


Tokens (JWT) in user authentication?
A. To encrypt user passwords. B. To C. To prevent D. To establish
authenticate SQL injection secure
users attacks. connections.
without
storing
session
information
on the
server.
2. Why is using HTTPS important in
server-side applications?
A. It provides a faster connection. B. It encrypts C. It allows for D. It improves
data direct access to server
transmission the server. performance
, enhancing .
security.
3. Which of the following is a technique for
optimizing the performance of server-
side applications?
A. Minification of HTML, CSS, and B. Increasing C. Using D. Ignoring
JavaScript files. server uncompressed caching
response images. mechanisms.
time.

4. What is the purpose of caching in server-


side development?
A. To slow down application performance. B. To store data C. To increase D. To
temporarily, server load. complicate
reducing the debugging
need for processes.
repetitive
processing.

5. How does load balancing contribute to


server-side architecture?
A. By increasing server response time. B. By C. By limiting the D. By
distributing number of prioritizing
incoming users specific user
traffic across accessing the requests.
multiple server.
servers.
6. What is the primary purpose of unit
testing in server-side development?
A. To test the entire application as a whole. B. To identify C. To test user D. To perform
and fix bugs interfaces. load testing.
in specific
units or
components
of code.
7. Which tool is commonly used for
debugging server-side applications?
A. Chrome Developer Tools B. Adobe C. Microsoft D. Eclipse
Photoshop Word
8. Why is automated testing important in
server-side development?
A. It saves time and resources. B. It is only C. Manual testing D. Automated
relevant for is more testing is not
small efficient. applicable to
projects. server-side
development
.
9. What is the primary focus of Server-Side
Development?
A. Client interface design B. Server logic C. Both client and D. Both client
and data server and server
processing communicatio communicati
n on

10. In a client-server architecture, where


does server-side logic typically occur?
A. On the client machine B. In the C. On the server D. In the
browser database
11. What does the term "backend" refer to in
web development?
A. Frontend design B. User C. Server-side D. Client-side
interactions code and scripting
database languages
12. In server-side development, what is the
primary distinction between synchronous
and asynchronous communication?
A. Synchronous involves real-time chat, B. Synchronous C. Synchronous D. Synchronous
while asynchronous involves emails. waits for is only used in is more
responses, large-scale secure than
while applications, asynchronou
asynchronou while s.
s does not. asynchronous
is for small
projects.
13. What is the role of middleware in server-
side development?
A. Handling frontend interactions B. Managing C. Facilitating D. Optimizing
server communicatio client-side
hardware n between scripts
different
software
components
14. Which of the following is a server-side
programming language?
A. HTML B. JavaScript C. Python D. CSS
15. What is the primary purpose of a web
framework in server-side development?
A. Enhancing browser performance B. Providing a C. Managing D. Writing
structure for server client-side
building hardware scripts
web
applications
16. In server-side development, what does a
microservices architecture emphasize?
A. A monolithic codebase B. Integration C. Decomposition D. Exclusive
of all of applications use of
services into into small, frontend
a single unit independent frameworks
services
17. What is the primary function of a web
server in server-side development?
A. Rendering web pages B. Managing C. Handling D. Executing
user sessions server-side client-side
logic and scripts
responding to
client requests
18. What does RESTful API stand for?
A. Remote Extensible Server Transfer API B. Remote C. Responsive D. Remote
Extensible Stateful Execution
Server Endpoint API Server
Transfer Transfer
API API
19. In server-side development, what is the
primary purpose of databases?
A. Rendering web pages B. Handling C. Storing and D. Managing
client-side retrieving data user
scripts for server-side interfaces
applications
20. What is SQL injection?
A. A method of injecting styles into HTML. B. A technique C. A type of D. A form of
to client-side malware.
manipulate scripting.
databases
through
unauthorized
queries.
21. What does ORM stand for in the context
of server-side development?
A. Object-Relational Mapping B. Object- C. Object- D. Output-
Resource Responsive Response
Model Middleware Mechanism
22. What is a common security threat in
server-side development that involves
injecting malicious scripts into input
fields?
A. Cross-Site Scripting (XSS) B. Cross-Site C. SQL Injection D. Distributed
Request Denial of
Forgery Service
(CSRF) (DDoS)
23. What is the purpose of JSON Web
Tokens (JWT) in user authentication?
A. To encrypt user passwords. B. To C. To prevent D. To establish
authenticate SQL injection secure
users attacks. connections.
without
storing
session
information
on the
server.
24. Why is using HTTPS important in
server-side applications?
A. It provides a faster connection. B. It encrypts C. It allows for D. It improves
data direct access to server
transmission the server. performance
, enhancing .
security.
25. Which of the following is a technique for
optimizing the performance of server-
side applications?
A. Minification of HTML, CSS, and B. Increasing C. Using D. Ignoring
JavaScript files. server uncompressed caching
response images. mechanisms.
time.

You might also like