Advertisement
dhshin

function

Jun 26th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function test(a, b) {
  2.   console.log('a=' + a + ', b=' + b);
  3.   console.log(arguments)
  4. }
  5.  
  6. test(1, 2); // "a=1, b=2"
  7. test(1, 2, 3); // "a=1, b=2"
  8. test(1); // "a=1, b=undefined"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement