Search Header Logo

NestJS and Next.js Knowledge Check

Authored by محمد غربي

Information Technology (IT)

KG

Used 3+ times

NestJS and Next.js Knowledge Check
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which design pattern does NestJS primarily follow?

Singleton design pattern

Observer design pattern

Dependency Injection design pattern

Factory design pattern

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is the purpose of the @Injectable() decorator in NestJS?

To define a route handler in a controller.

To create a new module in NestJS.

To manage application configuration settings.

To mark a class as a provider for dependency injection.

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

How do you handle exceptions globally in a NestJS application?

Use try-catch blocks in every service method.

Implement error handling in each controller individually.

Create a custom exception filter and use app.useGlobalFilters() to apply it globally.

Log errors to the console without any filters.

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is the primary purpose of modules in NestJS?

To provide a user interface for the application.

The primary purpose of modules in NestJS is to organize the application into cohesive blocks of functionality.

To enhance the performance of the application.

To manage database connections more efficiently.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the role of the app.module.ts file in a NestJS application?

To define the main entry point of the application.

To configure global middleware for the application.

To handle error logging and reporting.

To organize and import all modules, controllers, and providers in the application.

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is the purpose of the useMemo hook in React.js?

  • To memoize a function definition


To memoize a value so that it is only recomputed when its dependencies change

To manage side effects in functional components

To handle asynchronous operations

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

React.js allows you to use state in class components without lifecycle methods

no

yes

maybe

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?