-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Braindump #1
Comments
Ranges
For
Control flow
Errors
Classes
Strings
|
Numbers
|
Data Structures
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
// ...
and/* ... */
let
s,const
s, and methods are camelCase; classes are PascalCase[_a-zA-Z][_a-zA-Z0-9]*\??
?
must be boolean[_a-zA-Z][_a-zA-Z0-9]*\??!?
?
must return boolean!
it can throw an error (? comes before !)( ... )
{ ... }
if condition
if
s,for
s,switch
es don't need parens for args, must have braces, except forif
after statementif condition { foo }
orfoo if condition
(in latter case, braces aren't allowed)c ? b1 : b2
orc ?: b2
!
a <=> b
(numbers are simple, strings are by char, tuples/arrays are not allowed) return -1, 0, or 1(a, b) -> ...
.
nextcase
to fall through, multiple cases together[...] + [...]
returns new array. Same for tuple<...> + <...>
The text was updated successfully, but these errors were encountered: