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

MERN Stack Exam Questions and Answers

The document is a MERN stack examination paper consisting of three sections: multiple-choice questions, short answer questions, and coding tasks. It covers topics such as JavaScript data types, CSS properties, array and object differences, and asynchronous behavior in JavaScript. The paper includes questions requiring explanations, code outputs, and function implementations.

Uploaded by

Tushar Jangid
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)
11 views2 pages

MERN Stack Exam Questions and Answers

The document is a MERN stack examination paper consisting of three sections: multiple-choice questions, short answer questions, and coding tasks. It covers topics such as JavaScript data types, CSS properties, array and object differences, and asynchronous behavior in JavaScript. The paper includes questions requiring explanations, code outputs, and function implementations.

Uploaded by

Tushar Jangid
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

MERN STACK PAPER

Time: - 1:15 Hr Max. Marks: - 40

Section A 04

Q1. Which array method is used to add new items to the end of an array and return the new
length of the array? 02
a) shift()
b) unshift()
c) push()
d) pop()

Q2. Which of the following is a valid JavaScript data type? 02


a) Decimal
b) Double
c) BigInt
d) Float

Section B 14

Q1. Explain the difference between margin & padding in CSS. 2

Q2. Explain the difference between arrays & objects in JavaScript. 4

Q3. Write a JavaScript function called sumArray that takes an array of numbers as input and returns the sum of all
the numbers. For example array as: [2, 4, 2, 5, 2] 8

Section C 22

Q1. What is the output of the following code? 2


const obj = {id: 1001, name: 'userName'};
[Link](obj['id']);
a) 1001
b) userName
c) {id: 1001, name: 'userName'}
d) undefined

Q2. What is the reduce() method in javascript arrays? How can you use it? 4

Q3. How to merge arrays in java script using spread operator, give an example. 4

Q4. Explain the difference between synchronous and asynchronous behavior in JavaScript. 5

Q5. Write a JavaScript function called fetchData that uses the fetch API to make a GET request
to a given URL and returns the JSON response. 7

You might also like