Skip to content

Instantly share code, notes, and snippets.

@aliaspooryorik
Last active August 29, 2015 14:22
Show Gist options
  • Save aliaspooryorik/1b63e5bfa822ad8d9ccc to your computer and use it in GitHub Desktop.
Save aliaspooryorik/1b63e5bfa822ad8d9ccc to your computer and use it in GitHub Desktop.
argument ordering
<cfscript>
function foo(a=1,b=2) {
writeoutput(hash(serializeJSON(arguments)) & "<br>");
}
foo(1, 2);
foo(a=1, b=2);
foo(b=2, a=1);
foo(b=2);
foo(a=1);
foo();
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment