After months of writing Arcade expressions (an Esri ArcGIS language that is fairly similar to JavaScript) and referencing array indexes starting at zero, I can't break out of that habit with CF (where indexes start at one). I must have made this same mistake a dozen times in the last few days. 🤦
b
Brian Reilly
09/12/2023, 10:58 PM
Off by on 😉
d
Dave Merrill
09/13/2023, 2:29 AM
off by [0]
🤣 1
s
s1deburn
09/13/2023, 2:15 PM
reminds me of when i found out that month is zero based in javascript's date object... 20 years ago 🤦
r
rodyon
09/13/2023, 4:10 PM
yes, one of the js 'best' language design solutions ☝🏼
d
Dave Merrill
09/13/2023, 4:19 PM
One of my very first programming languages was 4D.
Its arrays had a 0 element, which was traditionally used to store the index of the selected element, like for a dropdown etc.
It kind of wasn't a real element, but it kind of was.
Mmmmph.