Advertisement
BojidarDosev

Two styles of js functuons

Mar 6th, 2024
815
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const plantNeedsWater = (day)  => {
  2.   if (day === 'Wednesday') {
  3.     return true;
  4.   } else {
  5.     return false;
  6.   }
  7. };
  8.  
  9.  
  10.  
  11. const plantNeedsWater = function(day)
  12. {
  13.   if(day === 'Wednesday')
  14.   {
  15.     return true;
  16.   }
  17.   else return false;
  18. }
  19. console.log(plantNeedsWater('Tuesday'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement