Simple question about syntax. In Angular, I've seen functions inside a controller created like this:
this.multiply = function multiply(a, b) {
return a * b;
}
I'm a bit thrown of since the function is given a name and also assigned to a variable with. So my question is why are functions assigned to variables in Angular? Does this affect scope?