1) Look at a semicolon
Without semicolon(s), a Java program cannot be compiled.
(That is if there are statements; an empty Java program or a Java program with only empty classes doesn't need any semicolons)
I think I've told this story before, but at a meeting for CS education leaders they organized a panel of high school kids taking CS classes, and someone asked them "What's been your biggest problem in learning programming?" And one after another, all four of them said "semicolons"! Made me proud.
I keep forgetting that.
case(3): alert("three")\u003b break\u003b
default: console.log(null)\u003b break\u003b
\x3b is a semicolon
I don't know why this is flagged
It's too short.
Actually,\u003b IS a semicolon! The Function object changes all characters in a string that has a reverse soildus to something else.
- \n means new line character
- \a means ring the bell
- \u means unicode digits
- \r means carrige return
- \f means form feed
- \\ means nothing but that old dull reverse solidus
- \/ means solidus
- \t means tab character
The actual source code does not have a semicolon.
I used the Function constructor and escaped semicolons (without using literal semicolons).
There is a "special" controll character,\a,to ring the bell like \u0007
For some reason, I like that control character, which in some places can be represented with
^G. In my programming language enilKode, if you use it in the
*It stands for "yes or no", but I might change the name
"a" for "alert."
Oh,no wonder it's not \b(meanwhile occupied by \u0008)
In enilKode, it is escaped with
'b in a text string.