News for hackers. Stuff that matters.
Re:Statements vs. Expressions by tomxor on Thursday July 14, 2022 @08:53AM (#32095436)
I feel like the examples and description for "statements" fails to demonstrate their breadth.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

In fairness it's difficult to talk about statements accurately and succinctly without being more abstract - and perhaps the more general observation here is how explanation by example alone is not always sufficient. A more general and yet tangible starting point for statements in JS could be "anything ending in a semicolon" (not quite true but almost for normal code), which at least is better at highlighting it's breadth before piling into arbitrary examples.

There are no comments on this comment yet.