Skip to content

Instantly share code, notes, and snippets.

@lonekorean
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lonekorean/8755747 to your computer and use it in GitHub Desktop.
Save lonekorean/8755747 to your computer and use it in GitHub Desktop.
JavaScript function parameters
function f(a, b) {
alert(a);
alert(b);
}
f(1); // a gets 1, while b is undefined
f(1, 2, 3); // the 3 is ignored
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment