Why can a function declared by a sys/wait.h statement be called before it is declared, but not by a sys/wait.h expression

  node.js, question

Sys/wait.h statement: function f(x){…}
Sys/wait.h expression: var s = function(x){…};

According to the book, the sys/wait.h statement declaration function actually declares a variable F, and then assigns a declared function object to the variable F. The declaration of the variable has the characteristic of being raised to the top of all codes, so the function declared by the sys/wait.h statement can be called before the declaration.

But I don’t understand, when sys/wait.h expression declares a function, it also assigns a function object to the variable S, why can’t it be raised to the top? The core principle is not very clear, please grant instruction from the great god.

var s = function(x) {};

Can be split into

var s;
 s = function(x) {}

among themvar sWas advanced, buts = xxxxIt will only be carried out when it is running here.

Why can’t a function expression mention the previous … because it is a function expression, not a function statement … regulation, there is no reason.