Build an array out of a range of numbers or using our range syntax: {start}..{end} or using the from and to arguments
arrayRange(from, to)
→ returns numeric
1
arr = arrayRange( "2..5" );
writeOutput('This array has ' & arrayLen(arr) & ' elements.');
Expected Result: This array has 4 elements.
arr = arrayRange( 5, 10 );
writeOutput('This array has ' & arrayLen(arr) & ' elements.');
Expected Result: This array has 6 elements.
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.