rying to figure out if array[1] is undefined or th...
# cfml-general
s
rying to figure out if array[1] is undefined or throwing error, want to use a ternary operator using a try catch to see if it has an error, throw as 0 else null, how can it be a one liner,
Copy code
my try: <cfset x = try { isDefined('array[1]') } ? catch(any e) {0} : array[1]>
is the above right