I wrote an Arcade expression in ArcGIS Pro to do symbology by unique value, which involves checking if my attribute "value" is empty.
Given that I was deeply influenced by Python syntax, I originally wrote something like below
if (value=None) {...} else {...}
This seems to work in ArcGIS Pro, but ArcGIS Online is having issue interpret this and therefore generated no symbology at all. However, my ArcGIS Online doesn't seem to take it very well until I rewrite this to be:
if (IsEmpty(value)) {...} else {...}
Does Arcade in ArcGIS Online use slightly different syntax compared to ArcGIS Pro?
To answer your question, yes, AGOL and Pro have slightly different flavors of Arcade. Also, "None" is actually a function in Arcade, you'll want to write "null". Oh and a single equals sign assigns a value to the variable.
There's no reason you couldn't do "if (value == null){…} else {…}".
var MyLine = When(!IsEmpty($feature.CuArea),$feature.CuArea+" cubic meters","No Volume was recorded for this record.")
//If using the Arcade PopUp Text Element, can display the above easily using:
`${MyLine}`
I recently took a half-day seminar in more efficient Arcade writing.
The When(!IsEmpty(xyz),ttt,eee) syntax was ubiquitous.