Coggle requires JavaScript to display documents.
export { yellName, formatName };
var
let
const
function
class
export const yellName = function (name) { return upperCaseName(name) +'!'; };
export { yellName as default };
export default yellName;
export default const yellName = function (name) { return upperCaseName(name) +'!'; };
import { yellName, formatName } from "./utilities.js";
import myVariableName from "./utilities.js";
type="module"
<script>
<script src="utilities.js" type="module"></script>
utilities.js
this
Window
defer
script
main.js
import { domReady } from "./generalUtil.js"; import { assignEvent, data, addClass, removeClass, $ } from "./domUtil.js"; import { breakOut } from "./stringUtil.js"; // main code ... export { displayFeedback };
index.html
<head> ... <script type="module" src="js/stringUtils.js"></script> <script type="module" src="js/domUtils.js"></script> <script type="module" src="js/generalUtils.js"></script> <script type="module" src="js/main.js"></script> </head>
stringUtils.js
// string utility code ... export { numChar, breakOut };
domUtils.js
import { numChar } from "./stringUtil.js"; // dom utility code ... export { $, assignEvent, data, addClass, removeClass };
generalUtils.js
export var domReady = function(funct) { ...
webpack
browserify
import
export
type
module
<head> ... <script src="js/bundle.js"></script> </head>