Advertisement
sissou123

Untitled

Mar 16th, 2022
659
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. JavaScript Algorithms and Data Structures
  2. ES6
  3. Set Default Parameters for Your Functions
  4. In order to help us create more flexible functions, ES6 introduces default parameters for functions.
  5.  
  6. Check out this code:
  7.  
  8. const greeting = (name = "Anonymous") => "Hello " + name;
  9.  
  10. console.log(greeting("John"));
  11. console.log(greeting());
  12. for more:http://besturl.link/3aeaJxGr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement