Kevin Marquette goes into great detail on Powershell’s $null
concept:
When a
$null
value is used in a numeric equation then your results will be invalid if they don’t give an error. Sometimes the$null
will evaluate to0
and other times it will make the whole result$null
. Here is an example with multiplication that gives 0 or$null
depending on the order of the values.
Nulls are tricky to handle in any language, making their nuances important to understand.