How to modify module variables imported by node

in ES6 module, basic type variables are all reference relationships, so it is easy to modify the variable value

but it doesn"t work in Node module. What should I do?

var mod = require("./a.js")

mod.count();
mod.count();
mod.count();

console.log(mod.a);  // 10
a.js

var a = 10;
module.exports = {
  a,
  count() {aPP}
}

how to implement the relocation wizard in Node module?

ES6 module

export * from "./fileName.js"
May.05,2022

just the first question:

// a.js

let _a = 0;
module.exports = {
    get a() {
        return _a;
    },
    set a(v) {
        _a = v;
    },
    inc() {
        _aPP;
    }
};

the second question is very simple. Think for yourself.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea6411-1dbd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea6411-1dbd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?