Guest User

Untitled

a guest
Jan 22nd, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. //ES6
  2. function f (a, b = 10, c = 20) {
  3. return x + y + z
  4. }
  5. f(5) === 35
  6.  
  7. //ES5
  8. function f (a, b, c) {
  9. if (b === undefined)
  10. y = 10;
  11. if (c === undefined)
  12. c = 20;
  13. return x + y + z;
  14. };
  15. f(1) === 35;
Add Comment
Please, Sign In to add comment