scottfontenot
4/9/2017 - 1:13 AM

Unit 2-Lesson 2-Project 3: String Drills

Unit 2-Lesson 2-Project 3: String Drills

function shouter(whatToShout) {
  // your code here
  return whatToShout.toUpperCase() + "!!!";
}
console.log(shouter("blah blah blah"));

/* From here down, you are not expected to 
   understand.... for now :)  
   
   
   Nothing to see here!
   
*/


// tests

function testShouter() {
  var whatToShout = 'fee figh foe fum';
  var expected = 'FEE FIGH FOE FUM!!!';
  if (shouter(whatToShout) === expected) {
    console.log('SUCCESS: `shouter` is working');
  }
  else {
    console.log('FAILURE: `shouter` is not working');
  }
}

testShouter();
JS Bin source https://jsbin.com/sigufuz

<!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) {
  // your code here
  return whatToShout.toUpperCase() + "!!!";
}
console.log(shouter("blah blah blah"));

/* From here down, you are not expected to 
   understand.... for now :)  
   
   
   Nothing to see here!
   
*/


// tests

function testShouter() {
  var whatToShout = 'fee figh foe fum';
  var expected = 'FEE FIGH FOE FUM!!!';
  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) {
  // your code here
  return whatToShout.toUpperCase() + "!!!";
}
console.log(shouter("blah blah blah"));

/* From here down, you are not expected to 
   understand.... for now :)  
   
   
   Nothing to see here!
   
*/


// tests

function testShouter() {
  var whatToShout = 'fee figh foe fum';
  var expected = 'FEE FIGH FOE FUM!!!';
  if (shouter(whatToShout) === expected) {
    console.log('SUCCESS: `shouter` is working');
  }
  else {
    console.log('FAILURE: `shouter` is not working');
  }
}

testShouter();</script></body>
</html>