Can someone explain why we create a function and then use 'let' to assign the anonymous function to a variable? What's the point of writing it like that?
function buildName(firstName: string, ...restOfName: string[]) {
return firstName + " " + restOfName.join(" ");
}
let buildNameFun: (fname: string, ...rest: string[]) => string = buildName;