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