Are expressions sometimes more appropriate than declarations?

Hello all. I have just finished the Javascript Number Guesser project, but I do have a question that makes no sense to me. I got all the way to the last function and I used a function expression for the “advanceRound” problem. I tried it a million different ways and it kept telling me I have a syntax error. I finally just voided the expression and wrote it out as a function declaration. It worked! is there reason for this? are expressions sometimes more appropriate than declarations? I hope somebody can help. Thank you?

Function expressions have better protection than declarations since we can declare them as const, meaning they cannot be deleted or reassigned. However, they are not hoisted so must be written above (before) where they are first called.

Check the placement of your function expression.