The distinction between “expression cells” and “program cells” is an important one, since expression cells implicitly display their content and program cells do not. It can be surprising that for single line cells, the distinction can come down to whether or not they end in a semicolon.
For example:
1 + 2
This is an expression cell that will display ‘3’, whereas:
1 + 2;
This is a program cell and will display nothing.
Or, as another example:
md`This is markdown!`
This is an expression cell that will display ‘This is markdown!’, whereas:
md`This is markdown!`;
This is a program cell that will display nothing.
Or, one last example:
myFunction(myStuff)
This is an expression cell that will display ‘myOutput’, whereas:
myFunction(myStuff);
This is a program cell that will display nothing.
I think part of what can make this tricky is that there is no visual indication (other than the lack of output!) that the cell is being treated one way or the other, since the identification as “expression cell” or “program cell” is behind-the-scenes “magic” to the user. As a result, when you don’t get an output, it is easy to think that you have made an error somewhere in the code, and not realize the inclusion of the semicolon has switched it to a different type of cell.
This can be particularly confusing in cases like calling a function, where in “normal” Javascript you might be used to always ending the line with a semicolon. And in normal Javascript, ending a line with a semicolon or not generally has no functional meaning (except in rare circumstances related to syntax) and is generally considered just a “style” issue.
Perhaps there should be some (subtle?) visual indication of when a cell has been classified as “expression” vs “program”?