Variable declaration is a statement but why function expression is not?

89 views Asked by At

I can not understand the difference between statement and expression. I think there is always something missing because I can't understand well the meaning of expression evaluates to a value. For example, we say about variable declaration a statement (let x = 2;) because it does not give us a returned value so why we say about function like this (let foo = function () {};) an expression not a statement while it also does not give us a returned value ?

0

There are 0 answers