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
<html> | |
<head> | |
<link type="text/css" rel="stylesheet" href="style.css" media="screen"/> | |
</head> | |
<body> | |
<div id="wrapper"> | |
<div id="cats"> | |
<div class="title"> | |
<h1>CATS</h1> |
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 fib(n) { | |
return function(n, a, b) { | |
return n > 0 ? arguments.callee(n - 1, b, a + b) : a; | |
}(n, 0, 1); | |
} |
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
<html> | |
<body> | |
<button onclick="clicked()">Hello</button> | |
<script type="text/javascript" src="script.js"></script> | |
</body> | |
</html> |
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 cloneElementWithStyles(element) { | |
var clonedEl = $(document.createElement(element.tagName)); | |
// CSS styles to copy over from the generated node. | |
var stylesToCopy = ['font', 'color']; | |
// Copy css styles. | |
clonedEl.attr('style', getComputedStyles(stylesToCopy, element)); | |
// Clone children. |
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
JavaScript | Python | ||
---|---|---|---|
Boolean | true false | True False | |
Nothing | null | None | |
Empty Value | undefined |