Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JavaScript Algorithms and Data Structures
- ES6
- Set Default Parameters for Your Functions
- In order to help us create more flexible functions, ES6 introduces default parameters for functions.
- Check out this code:
- const greeting = (name = "Anonymous") => "Hello " + name;
- console.log(greeting("John"));
- console.log(greeting());
- for more:http://besturl.link/3aeaJxGr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement