79471791

Date: 2025-02-27 06:47:43
Score: 1
Natty:
Report link

Because you are not export myFunc as object, you should call test2(), in test2.js

const test2 = require('./test1.js');
console.log(test2());

or you can export myFunc as object, in test1.js

const myFunc = () => {
    return "Hello World!";
};
module.exports = {myFunc};
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Chandalen Teang