![]() |
![]()
JavaScript treats whitespace characters as separators but otherwise ignores them. Additionally, newlines insert automatic semicolons when possible. In either case, a liberal and consistent use of whitespace makes scripts easier to read and more maintainable.
Because newlines naturally separate statements, scripts can often omit the semicolon separator. Scripts must be aware of the automatic semicolons because in a few cases, statements may be unexpectedly separated.
The default source encoding is Latin-1, i.e. ISO-8859-1. Because characters are 16-bits and the source file is 8-bits, the source file is an encoding of the 16-bit characters. The default encoding converts the bytes to the character with the same number, i.e. byte 245 becomes character 245. This poses a problem for languages like Japanese which use all 16 bits. The calling program, e.g. JSP, will set the encoding using a program-specific method.
Single line comments cause Resin to ignore all text to the end of the line.
All the is ignored. Multiline comments do not nest.
|