how to do an external javascript file in html code example
Example 1: import js in html
<script type="text/javascript" src="yourfile.js"></script>
Example 2: javascript class in external file
class User {
//...
}
module.exports = User
<script type="text/javascript" src="yourfile.js"></script>
class User {
//...
}
module.exports = User