Created
March 7, 2017 15:00
-
-
Save Mattteo1220/cd7d263ede6982a867e7786827b62d2a to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/mayegay
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> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
function makeList(item1, item2, item3) { | |
return makeList = [item1,item2,item3]; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! | |
*/ | |
// tests | |
function testMakeList() { | |
var items = ["prime rib", "fried goat cheese salad", "fish tacos"]; | |
var result = makeList(items[0], items[1], items[2]); | |
if ( | |
result && result.length && items.length === result.length && | |
items.every(function(item) { | |
return result.indexOf(item) > -1; | |
})) { | |
console.log('SUCCESS: `makeList` works!'); | |
} else { | |
console.error('FAILURE: `makeList` is not working'); | |
} | |
} | |
testMakeList(); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">function makeList(item1, item2, item3) { | |
return makeList = [item1,item2,item3]; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! | |
*/ | |
// tests | |
function testMakeList() { | |
var items = ["prime rib", "fried goat cheese salad", "fish tacos"]; | |
var result = makeList(items[0], items[1], items[2]); | |
if ( | |
result && result.length && items.length === result.length && | |
items.every(function(item) { | |
return result.indexOf(item) > -1; | |
})) { | |
console.log('SUCCESS: `makeList` works!'); | |
} else { | |
console.error('FAILURE: `makeList` is not working'); | |
} | |
} | |
testMakeList();</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 makeList(item1, item2, item3) { | |
return makeList = [item1,item2,item3]; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! | |
*/ | |
// tests | |
function testMakeList() { | |
var items = ["prime rib", "fried goat cheese salad", "fish tacos"]; | |
var result = makeList(items[0], items[1], items[2]); | |
if ( | |
result && result.length && items.length === result.length && | |
items.every(function(item) { | |
return result.indexOf(item) > -1; | |
})) { | |
console.log('SUCCESS: `makeList` works!'); | |
} else { | |
console.error('FAILURE: `makeList` is not working'); | |
} | |
} | |
testMakeList(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment