Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfscript>
- arr = [1,2,3,4];
- struct = {"a":1,"b":2};
- /* FAILS WITH PARAMETER VALIDATION ERROR */
- //results = arr.map((a)=>a+1);
- //results = struct.map((a,b,c)=>a);
- //results = arr.filter((a)=>a==2);
- //results = struct.filter((a,b)=>b==2);
- results = arr.map((a)=>{return a+1});
- results = arr.filter((a)=>{return a==2});
- results = struct.map((a,b,c)=>{return a});
- results = struct.filter((a,b)=>{return b==2});
- // For some reason, reduce functions parse parameters correctly
- results = arr.reduce((a,b)=>a);
- results = struct.reduce((a,b,c)=>a);
- writeDump('worked!');
- </cfscript>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement