node day02

node day02

Professional Development

27 Qs

quiz-placeholder

Similar activities

Installation photovoltaïque autonome

Installation photovoltaïque autonome

Professional Development

24 Qs

SOR - PowerShell - UT1, UT2

SOR - PowerShell - UT1, UT2

Professional Development

23 Qs

កម្រងសំណួរប្រព័ន្ធធនាគារស្នូល​ FlexCube 14.7

កម្រងសំណួរប្រព័ន្ធធនាគារស្នូល​ FlexCube 14.7

Professional Development

22 Qs

MarkLogic Bootcamp Evaluation

MarkLogic Bootcamp Evaluation

Professional Development

25 Qs

Call Components

Call Components

Professional Development

22 Qs

 Final revalida de ayudante de perito electricista

Final revalida de ayudante de perito electricista

Professional Development

23 Qs

Data Science Fundamentals

Data Science Fundamentals

Professional Development

25 Qs

first year1

first year1

8th Grade - Professional Development

22 Qs

node day02

node day02

Assessment

Quiz

Other

Professional Development

Medium

Created by

Gnanavel Durairaj

Used 4+ times

FREE Resource

27 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does require() do in Node.js?

Defines a module

Loads a module

Deletes a module

Compiles a module

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to export functions in Node.js?

export

exports

module.exports

define

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When using module.exports, what happens if we assign a new object directly?

It overrides the previous object

It merges with the existing object

It adds a new property to exports

It causes an error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you import a local module named utility.js?

import 'utility.js'

require('./utility')

include 'utility.js'

module.load('utility.js')

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What is the default encoding for fs.readFile()?

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you write to a file without overwriting its content?

fs.writeFile(filename, data)

fs.appendFile(filename, data)

fs.addFile(filename, data)

fs.saveFile(filename, data)

7.

FILL IN THE BLANK QUESTION

1 min • 2 pts

Which function checks if a file exists?

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?