Got a pretty simple question to which I cant find an answer regarding exporting a object form a module in Node js, more specifically accessing the objects properties.
Here is my object I export:
exports.caravan = {
month: "july"
};
And here is my main module:
var caravan = require("./caravan")
console.log(caravan.month);
console.log(caravan.caravan.month);
Why cant I access the properties directly with caravan.month but have to write caravan.caravan.month?