...
Code Block | ||||
---|---|---|---|---|
| ||||
function main() {
pjs.define("x", { type: "integer" });
pjs.define("y", { type: "integer" });
x = 1;
y = 2;
pjs.import("./main/increment.js");
increment();
console.log(x, y); // outputs 2 4
}
exports.run = main; |
Code Block | ||||
---|---|---|---|---|
| ||||
function main() { pjs.define("x", { type: "integer" }); pjs.define("y", { type: "integer" }); x = 1; y = 2; pjs.import("./main/increment.js", ["increment"]); increment(); console.log(x, y); // outputs 2 4 } exports.run = main; |
Code Block | ||||
---|---|---|---|---|
| ||||
function main() {
pjs.define("x", { type: "integer" });
pjs.define("y", { type: "integer" });
x = 1;
y = 2;
pjs.import("./main/*.js");
increment();
decrement();
decrement();
console.log(x, y); // outputs 0 0
}
exports.run = main; |