Comments
Users can place comments anywhere in the script. Comments by placing a /*
at the start and a */
at the end.Example: /* This is the proper structure for a comment are not evaluated, but can be used for documentation or temporarily disabling blocks of code.
JavaScript supports two types of comments:
Single-line comments start with
//
and end when the line ends.Block comments start with
/*
and end with*/
. These can extend across multiple lines, or be used within a single line.
Example:
Code Block |
---|
// This is a single-line comment /* This is a * multi-line * comment.*/ |
Declaring Variables
Item | Description |
Variable Declaration | Declare internal variables using the following format:
The initial value of declared numerical variables is 0. To declare more than one variable, use a comma
Users can use multiple Users can also define an initial value for the variable when declaring it using the following format:
|
Program Part
An example of a most basic statement is the function call, calculation, and storing of the result.
...