<https://trycf.com/gist/40e48c92a45cb69052612527f5...
# lucee
a
https://trycf.com/gist/40e48c92a45cb69052612527f5136ba5/lucee5?theme=monokai
Copy code
["tahi", "rua", "toru", "wha"].each((v, i) => {
    writeOutput("#i#:#v#<br>")
})

[true, false].each((v, i) => {
    writeOutput("#i#:#v#<br>")
})
Errors with "Invalid Syntax Closing []] not found on line 6" stick a semi-colon after the first expression: all good. Will check Jira...
Couldn't find anything. Couldn't think what to search for other than "array literal" or "semi-colon", and it ain't mentioned there.
z
@bdw429s would know this of the top of his head i bet
i
Is it fixable? It's almost (but not quite) ambiguous code. Because without the semi, its almost not clear if you are trying to define a new array, or reference the previous one. https://trycf.com/gist/e0c70dddc0b3672fd2bb6fa9d166c94f/lucee5?theme=monokai In the exact case, with [true, false] its less ambiguous, but could it be fixed in the case I outlined without breaking other expected functionality?
👍 1
a
Yeah suspect it's thinking I have written this:
Copy code
["tahi", "rua", "toru", "wha"].each((v, i) => {
    writeOutput("#i#:#v#<br>")
})[true, false]
As in it's thinking the
[true, false]
thing is badly-formed associative array notation.
🙌 1
JS falls over in the same way. I think we should run with "suck it up, Cameron".
🤣 1