The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
var moonWalkers = [ | |
"Neil Armstrong", | |
"Buzz Aldrin", | |
"Pete Conrad", | |
"Alan Bean", | |
"Alan Shepard", | |
"Edgar Mitchell", | |
"David Scott", | |
"James Irwin", | |
"John Young", |
var getRelationship = function(x, y) { | |
// If both arguments are numbers | |
if ( !isNaN(x) && !isNaN(y) ) { | |
if ( x == y ) { // if they are equal, return '=' | |
return '='; | |
} else { // if not, return comparison operator | |
return x < y ? '<' : '>'; |
<body> | |
<h1>Day 10</h1> | |
<h2><a href="">Script tag logic example</a></h2> | |
<script> | |
alert('This is JavaScript alert. Look around your screen and note that there is no image right now.'); | |
</script> | |
<img src="http://js.ework.me/code/d10-script-tag/bateaumatineeFA.jpg"> |