Guest User

Untitled

a guest
Nov 18th, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. function computeArea(width, height) {
  2. return width * height;
  3. }
  4.  
  5. function testComputeArea() {
  6. let width = 3;
  7. let height = 4;
  8. let expected = 12;
  9. if (computeArea(width, height) === expected) {
  10. console.log('SUCCESS: `computeArea` is working');
  11. }
  12. else {
  13. console.log('FAILURE: `computeArea` is not working');
  14. }
  15. }
  16.  
  17. testComputeArea();
Add Comment
Please, Sign In to add comment