I am having some troubles to understand what this code do. Its a simple operation but i am confused with the result
$scope.diff = ($scope.diff || 0) - (e.model.ContainerReturnedNo || 0) + (e.values.ContainerReturnedNo || 0)
What is that $scope.diff ||
means?
Giving numbers like $scope.diff = undefined
, e.model.ContainerReturnedNo = 3
and e.values.ContainerReturnedNo = 4
the result is 4. Can any one explain to me please? This is AngularJS with kendo UI.
Thanks