node day02

node day02

Professional Development

27 Qs

quiz-placeholder

Similar activities

Quiz Pelatihan Menulis Rapi dengan PUEBI

Quiz Pelatihan Menulis Rapi dengan PUEBI

Professional Development

30 Qs

AND-801 Quiz test

AND-801 Quiz test

KG - Professional Development

30 Qs

ELECTRONICS - II - MOSFET

ELECTRONICS - II - MOSFET

Professional Development

31 Qs

2024 FS Trivia Questions

2024 FS Trivia Questions

Professional Development

30 Qs

HTML & CSS Master Quizz

HTML & CSS Master Quizz

Professional Development

30 Qs

debug quiz part 2

debug quiz part 2

Professional Development

25 Qs

Google Boot Camp Day 1 Review

Google Boot Camp Day 1 Review

Professional Development

25 Qs

[𝐎𝐌𝐎𝐍] RRU Unit Events

[𝐎𝐌𝐎𝐍] RRU Unit Events

Professional Development

25 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?