function test() {
console.log("1")
}
vs.
let test = function () {
console.log("1")
}
I know this may be preference but I'm asking because I had an interview in which the interviewee said "I noticed you use function declarations exclusively which isn't a great practice". I asked for more clarification as to "why" but he never gave a reason.
I thought the only difference was that function expressions do not get hoisted up as where function declarations do get hoisted so I always opt for function declarations. Am I missing an advantage of function expressions that I don't know?