Comment Comment by dtagames The way I think of it is that statements involve keywords from the language (like 'let', 'export class', or 'if') while expressions do not.With this definition, it's easy to see that, if the syntax starts with a language keyword, it's a statement.BTW, language functions (like 'Array.join()') are expressions because they don't start with a keyword. parent dtagames 4 years ago
With this definition, it's easy to see that, if the syntax starts with a language keyword, it's a statement.
BTW, language functions (like 'Array.join()') are expressions because they don't start with a keyword.