-
-
Save alfaraday/b4d16e2916e0f09e73a339e7667fd186 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/mukeyi
This file contains hidden or 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> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
function todaysSpecials(special1, special2, special3) { | |
return [special1, special2, special3]; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! | |
*/ | |
// tests | |
function testTodaysSpecials() { | |
var specials = ["prime rib", "fried goat cheese salad", "fish tacos"] | |
var result = todaysSpecials(specials[0], specials[1], specials[2]); | |
if ( | |
specials.length === result.length && | |
specials.every(function(item) { | |
return result.indexOf(item) > -1; | |
})) { | |
console.log('SUCCESS: `todaysSpecial` works!'); | |
} else { | |
console.error('FAILURE: `todaysSpecial` is not working'); | |
} | |
} | |
testTodaysSpecials(); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">function todaysSpecials(special1, special2, special3) { | |
return [special1, special2, special3]; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! | |
*/ | |
// tests | |
function testTodaysSpecials() { | |
var specials = ["prime rib", "fried goat cheese salad", "fish tacos"] | |
var result = todaysSpecials(specials[0], specials[1], specials[2]); | |
if ( | |
specials.length === result.length && | |
specials.every(function(item) { | |
return result.indexOf(item) > -1; | |
})) { | |
console.log('SUCCESS: `todaysSpecial` works!'); | |
} else { | |
console.error('FAILURE: `todaysSpecial` is not working'); | |
} | |
} | |
testTodaysSpecials(); | |
</script></body> | |
</html> |
This file contains hidden or 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 todaysSpecials(special1, special2, special3) { | |
return [special1, special2, special3]; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! | |
*/ | |
// tests | |
function testTodaysSpecials() { | |
var specials = ["prime rib", "fried goat cheese salad", "fish tacos"] | |
var result = todaysSpecials(specials[0], specials[1], specials[2]); | |
if ( | |
specials.length === result.length && | |
specials.every(function(item) { | |
return result.indexOf(item) > -1; | |
})) { | |
console.log('SUCCESS: `todaysSpecial` works!'); | |
} else { | |
console.error('FAILURE: `todaysSpecial` is not working'); | |
} | |
} | |
testTodaysSpecials(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment