Welcome to the Linux Foundation Forum!

7.3 module.exports question and answer clarification

A. module.exports = func
C. module.exports = {func}

Can someone point me to more detailed reading on why the answer is A and C is incorrect above: when a given a function named func, how can func be exposed such that when the file that func is in is loaded by another module, the result of the require statement is func?

Comments

  • Posts: 1,272

    Hi @sood , I think you are in the incorrect forum. This is the Linux Networking and Administration (LFS211) forum.

    Regards,
    Luis.

  • Posts: 3

    Thanks. I was looking for LFW211 not LFS211

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training