Have a question?
Message sent Close
time left:
:
:

Instructor's Assessment test

Submit quiz
Once you submit, you will no longer be able to change your answers. Are you sure you want to submit the quiz?
1.

A function runs repeatedly during scroll events, causing lag. What should you implement?

 

A. Memoization
C. Closures
D. Debounding
B. Recursion
2.

Your Node.js app becomes slow under heavy traffic. Which Node.js module can help you scale?

B. Path
C. Cluster
D. HTTP
A. OS
3.

 What is the main role of GitHub Actions in a project?

D. Monitoring UI performance
A. Writing backend code
B. Managing databases
C. Automating workflows
4.

Before deploying a full-stack app, what is MOST critical?

 

 

D. Removing tests
C. Increasing UI animations
B. Writing more features
A. Logging, monitoring, and error handling
5.

You want to log every incoming request globally. Where should this logic go?

 

A. Inside route handlers
B. In the controller
D. In the database layer
C. As an Express middleware
6.

You need strict relationships and transactions for financial data. Which database should you choose?

 

A. MongoDB
D. PostgreSQL
B. Firebase
C.Elasticsearch
7.

CSS Performance

A webpage feels slow due to heavy style recalculations. Which CSS practice helps improve performance?

D. Using simple class selectors
B. Using !important everywhere
A. Deeply nested selectors
C. Inline styles
8.

What problem does Socket.IO solve on top of WebSockets?

 

C. File uploads
A. Database persistence
D. Authentication
B. Automatic reconnection and fallbacks
9.

Why should JWTs NOT be stored in localStorage for sensitive apps?

B. Difficult to decode
A. Limited size
D. They expire too fast
C. Vulnerable to XSS attacks
10.

A user sends invalid input data to your API. What status code should you return?

C. 401
B. 400
D. 500
A. 200
11.

You are building a form for a public-facing application. To improve accessibility for screen readers, which HTML practice is MOST appropriate?

C. Associating
A. Using
elements for all form fields
D. Using placeholders instead of labels
B. Adding aria-hidden="true" to input fields
12.

Your pipeline fails if tests don’t pass. What principle does this enforce?

 

A. Manual deployment
C. Agile methodology
D. Continuous integration
B. Continuous delivery
13.

You need real-time validation while a user types. Which approach is ideal?

A. Uncontrolled inputs
B. Controlled components
C. DOM queries
D. Form submission only
14.

You are storing chat messages with varying schemas. Which database fits best?

 

A. PostgreSQL
D. Redis
C. MongoDB
B. MySQL
15.

Why use Docker in development?

D. Automatic scaling
A. Faster internet
B. Same environment across machines
C. Better UI
16.

You are fetching data from an API and need to handle errors gracefully. Which approach is best?

 

D. Using setTimeout
C. Synchronous XMLHttpRequest
B. try...catch with async/await
A. Callback functions only
17.

Why should secrets be stored in environment variables?

D. Improved security
A. Faster access
C. Better performance
B. Easier debugging
18.

In an MVC application, where should business logic reside?

 

B. Controller
C. Model
A. View
D. Router
19.

You are building a real-time chat app. Why choose WebSockets over HTTP polling?

 

A. Easier authentication
B. Reduced latency and persistent connection
C. Better SEO
D. Stronger encryption
20.

Why should integration tests use a test database?

 

A. Faster development
D. To reduce test files
C. To avoid affecting production data
B. Better UI testing
21.

Why is Vercel ideal for React and Next.js apps?

 

B. Built-in CI, CDN, and serverless functions
D. No environment variables
C. Requires Docker
A. Supports only static files
22.

A deeply nested component needs access to global authentication data. What is the BEST solution?

 

A. Passing props through all components
D. Using refs
C. Context API or Redux
B. Local state in each component
23.

React Rendering

Your React component re-renders unnecessarily when props don’t change. What should you use?

B. useCallback
A.React.memo
C. useEffect
D. useRef
24.

Why are Docker containers lighter than VMs?

A. They use less JavaScript
C. They don’t need RAM
D. They run without an OS
B. They share the host OS kernel
25.

A bug occurs because a variable declared inside a loop is accessible outside it. Which keyword likely caused this?

A. var
B. let
D. function
C. const
26.

A client wants to update only one field of a resource. Which HTTP method is most appropriate?

 

C. PUT
A. GET
D. PATCH
B. POST
27.

You want to automatically test both the request and the database response in an Express API. What tools are best?

 

D. Postman
A. Mocha and Chai
B. Jest and Supertest
C. Cypress only
28.

You need to create a responsive layout where items wrap automatically based on screen size. Which CSS solution is best?

A. Float layout
B. CSS Grid with fixed columns
D. Inline-block elements
C. Flexbox with flex-wrap
29.

Your query performance is slow on large datasets. What improves it?

 

B. Adding indexes
D. Using more APIs
A. Removing joins
C. Increasing server RAM only
30.

You want to release breaking API changes without affecting existing clients. What’s the best approach?

 

B. Remove old endpoints
C. Change database schema
A.  Version the API (e.g. /v2)
D. Use query parameters
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30