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.

React Rendering

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

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

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

 

C. Change database schema
B. Remove old endpoints
D. Use query parameters
A.  Version the API (e.g. /v2)
3.

Why are Docker containers lighter than VMs?

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

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

 

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

Why use Docker in development?

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

In an MVC application, where should business logic reside?

 

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

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

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

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

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

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

 

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

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

 

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

Why should secrets be stored in environment variables?

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

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

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

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

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

Why should integration tests use a test database?

 

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

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

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

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

 

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

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

 

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

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

 

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

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

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

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

 

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

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

 

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

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

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

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
24.

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

 

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

CSS Performance

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

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

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

 

 

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

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

 

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

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

 

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

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

 

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

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

 

D. No environment variables
C. Requires Docker
A. Supports only static files
B. Built-in CI, CDN, and serverless functions
  • 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