This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function runWithDebugger(callback, array){ | |
debugger; | |
// when has second argument | |
if(arguments.length > 1){ | |
// when second argument's type is array | |
if(Array.isArray(array)){ | |
callback.apply(null, array); | |
// when second argument's type is not array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
// build a storage for libraries | |
var libraryStorage = {}; | |
function librarySystem(libraryName, dependencyArray, callback){ | |
// when has dependencyArray and callback | |
if(arguments.length > 1){ | |
// when has dependency | |
if(dependencyArray.length > 0){ | |
// save the content of dependency in an array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ch14-exercise-Build A Table</title> | |
</head> | |
<body> | |
<h1>Mountains</h1> | |
<div id="mountains"></div> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ch14-exercise-Element By Tag Name</title> | |
</head> | |
<body> | |
<h1>Heading with a <span>span</span> element.</h1> | |
<p>A paragraph with <span>one</span>, <span>two</span> spans.</p> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ch14-exercise-The Cat's Hat</title> | |
<style>body { min-height: 200px }</style> | |
</head> | |
<body> | |
<img src="img/cat.png" id="cat" style="position: absolute"> | |
<img src="img/hat.png" id="hat" style="position: absolute"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ch15-exercise-Balloon</title> | |
</head> | |
<body> | |
<p id="myP">🎈</p> | |
<script> | |
let balloon = document.getElementById("myP"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ch15-exercise-Mouse Trail</title> | |
<style> | |
.trail { /* className for the trail elements */ | |
position: absolute; | |
height: 6px; | |
width: 6px; | |
border-radius: 3px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ch15-exercise-Tabs</title> | |
</head> | |
<body> | |
<tab-panel> | |
<div data-tabname="one">Tab one</div> | |
<div data-tabname="two">Tab two</div> | |
<div data-tabname="three">Tab three</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ch16-exercise-GameOver</title> | |
<script src="levels.js"></script> | |
<!-- <link rel="stylesheet" href="css/game.css"> --> | |
<style> | |
.background { background: rgb(52, 166, 251); | |
table-layout: fixed; | |
border-spacing: 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ch16-exercise-PausingTheGame</title> | |
<script src="levels.js"></script> | |
<!-- <link rel="stylesheet" href="css/game.css"> --> | |
<style> | |
.background { background: rgb(52, 166, 251); | |
table-layout: fixed; | |
border-spacing: 0; } |
OlderNewer