I was reading https://docs.angularjs.org/api/ng/function/angular.noop which has this example:
function foo(callback) {
var result = calculateResult();
(callback || angular.noop)(result);
}
I can't work out what this line is doing:
(callback || angular.noop)(result);
It looks like callback and angular.noop are functions that can return true or false, but what is the value used for, and what does (result) do next to it?