Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script id="jsbin-javascript">
- function shouter(whatToShout) {
- return 'shouter:'+ '"as you can hear i am whispering + !!!"';
- }
- // tests
- function testShouter() {
- var shouter = 'whatToShout';
- shouter.toUpperCase();
- var expected = 'SHOUTER:'+ '"AS YOU CAN HEAR I AM WHISPERING + !!!"';
- var actual = shouter(whatToShout);
- if (expected === actual) {
- console.log('SUCCESS: `whatToShout` is working');
- }
- else {
- console.log('FAILURE: `whatToShout` is not working');
- }
- }
- </script>
- <script id="jsbin-source-javascript" type="text/javascript">function shouter(whatToShout) {
- return 'shouter:'+ '"as you can hear i am whispering + !!!"';
- }
- // tests
- function testShouter() {
- var shouter = 'whatToShout';
- shouter.toUpperCase();
- var expected = 'SHOUTER:'+ '"AS YOU CAN HEAR I AM WHISPERING + !!!"';
- var actual = shouter(whatToShout);
- if (expected === actual) {
- console.log('SUCCESS: `whatToShout` is working');
- }
- else {
- console.log('FAILURE: `whatToShout` is not working');
- }
- }</script>
Add Comment
Please, Sign In to add comment