News for hackers. Stuff that matters.
Re:Statements vs. Expressions by azangru on Thursday July 14, 2022 @05:51AM (#32093962)
I've never read the ECMAScript spec; but searching through it, I can see that the terms they use is function declaration vs function expression. According to their terminology, function bar(){} on the second line of your function example is a function declaration.
Re:Statements vs. Expressions by epolanski on Thursday July 14, 2022 @01:44PM (#32099216)
Yes, and a function declaration is a statement.