...
Additionally it is good practise to add comments to code to allow other people to understand itthe code you have written. Comments are not evaluated when the code is run. To add a comment start a new line and begin it with */ and end it with *\/.
eg. if(_out.AppleHarvestDate < toDate('20210101'), 1,
/* ELSE */
0
)
Macros
Sometimes we might want to write our own expressions that can be used time and again. To do this we can write a Macro. Instead of a writing the name of each attribute in the expression, instead make it generic by writing $args[1], $args[2] etc.
...