javascript import external file code example
Example 1: include other js files in a js file
document.writeln("<script type='text/javascript' src='Script1.js'></script>");
document.writeln("<script type='text/javascript' src='Script2.js'></script>");
Example 2: how to call a script from another script in javascript
function alertNumber( n ) {
alert( n );
};
function alertOne( ) {
alertNumber( "one" );
};
alertOne( );
Example 3: javascript class in external file
class User {
}
module.exports = User