Created
April 26, 2017 02:05
-
-
Save dtstanley/7837cd87a6564f45f00d3f76cda12e4d to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/boruzet
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 wisePerson(wiseType, whatToSay) { | |
var message = 'A wise ' + wiseType + ' once said: "' + whatToSay +'".'; | |
return message; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! | |
*/ | |
// tests | |
function testWisePerson() { | |
var wiseType = 'goat'; | |
var whatToSay = 'hello world'; | |
var expected = 'A wise ' + wiseType + ' once said: "' + | |
whatToSay + '".'; | |
var actual = wisePerson(wiseType, whatToSay); | |
if (expected === actual) { | |
console.log('SUCCESS: `wisePerson` is working'); | |
} | |
else { | |
console.log('FAILURE: `wisePerson` is not working'); | |
} | |
} | |
testWisePerson(); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">function wisePerson(wiseType, whatToSay) { | |
var message = 'A wise ' + wiseType + ' once said: "' + whatToSay +'".'; | |
return message; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! | |
*/ | |
// tests | |
function testWisePerson() { | |
var wiseType = 'goat'; | |
var whatToSay = 'hello world'; | |
var expected = 'A wise ' + wiseType + ' once said: "' + | |
whatToSay + '".'; | |
var actual = wisePerson(wiseType, whatToSay); | |
if (expected === actual) { | |
console.log('SUCCESS: `wisePerson` is working'); | |
} | |
else { | |
console.log('FAILURE: `wisePerson` is not working'); | |
} | |
} | |
testWisePerson(); | |
</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 wisePerson(wiseType, whatToSay) { | |
var message = 'A wise ' + wiseType + ' once said: "' + whatToSay +'".'; | |
return message; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! | |
*/ | |
// tests | |
function testWisePerson() { | |
var wiseType = 'goat'; | |
var whatToSay = 'hello world'; | |
var expected = 'A wise ' + wiseType + ' once said: "' + | |
whatToSay + '".'; | |
var actual = wisePerson(wiseType, whatToSay); | |
if (expected === actual) { | |
console.log('SUCCESS: `wisePerson` is working'); | |
} | |
else { | |
console.log('FAILURE: `wisePerson` is not working'); | |
} | |
} | |
testWisePerson(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment