Create app init

This commit is contained in:
LSvekis
2021-07-01 19:32:02 -04:00
committed by GitHub
parent 53d253cf55
commit dd5b402e25
+21
View File
@@ -0,0 +1,21 @@
<!doctype html>
<html>
<head>
    <title>Complete JavaScript Course</title>
</head>
<body>
<script>
const val = "Bye Bye";
const app = function () {
const val = "Hello World";
function init() {
console.log(val);
}
return {
init: init
};
}();
document.addEventListener('DOMContentLoaded', app.init);
</script>
</body>
</html>