Suppose to have to file A.js and B.js:
the path of this folder is:
A.js is in Project/Home and B.js is in Project
Project
Home
A.js
B.js
Suppose the code of B.js is something like this:
var elementi={name:'hi'};
var esporta={};
esporta.getAllElementi = elementi;
module.exports = esporta;
The code of A.js is :
var elementi=require("../B.js");
//but when I call
var variable=elementi.getAllElementi;
the problem is the variable is null, Anyone can help me?