Skip to content

Instantly share code, notes, and snippets.

@elpete elpete/forLoop.cfm
Last active Nov 23, 2015

Embed
What would you like to do?
Issues using the `arguments` scope with `for` loops
<cfscript>
function dumpOutput(filters = {}) {
for (var key in arguments.filters) {
writeDump({
key = key,
value = arguments.filters[key],
struct = arguments.filters
});
}
}
function dumpByPassingArguments() {
dumpOutput(filters = arguments);
}
writeDump("Dump by passing struct directly:");
dumpOutput({
orderNumber = [
'10000000',
'10000001'
]
});
writeOutput("<br />");
writeDump("Dump by passing struct through the arguments scope of another function:");
dumpByPassingArguments({
orderNumber = [
'10000000',
'10000001'
]
});
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.