Chinit(name) Last updated: 13. Apr 2023

Creates a counter variable with specified name. Note that any variable with this name will be overwritten in the current scope.

Parameters

Name Type Description
name string Name of variable to store chapter counter in.

Returns

Nothing, just initializes the variable.

Example

Code example (#JS)

#JS is mixed HTML (or other text file) with inline JavaScript with # starting and ending each inline statement.
#chinit("counter1")#

Counter 1 value is: #counter1#

Output

The #JS code above produces the output shown below:

Counter 1 value is: 0