Please tell me how to call function1 of file2 from file1.
I wish I could only recall that function.
javascript function call
You should specify this part because the way you refer to other files is different for each script implementation (JavaScript Launcher).
For browsers:
<script src="other files.js"></script>
There's a way to include it in one HTML.
If Node.js:
//Syntex 1 :
function drawCircle() {
...
}
exports.drawCircle = drawCircle;
//Syntex 2 :
exports.fibonacchi = function(num) {
return -1;
};
//Syntex 3 :
var show = exports.show = function() {
console.log('hi');
}
Export it like this,
var userModule = require('./user_module');
I write it down like this.
© 2024 OneMinuteCode. All rights reserved.