Statements list of the JavaScript language
Some
JavaScript statements cannot be used in the PROMOTIC system. It goes first of all about the statements that define functions and the statements for calling functions connected with them. These statements are meant for the definition of functions on the script level, while in the PROMOTIC system there is defined the content of the functions themselves. It means that the script, for example, of the
Pma object event is a body of the function and therefore it is not possible to define other functions.
Useful statements:
break | Exits a switch statement and a loop statement (for, while, do...while) |
// | Marks the portion of script that will be ignored during script execution (comment) |
continue | Terminates one iteration in the for loop and continues with the next iteration in the loop |
while | Repeats a block of statements while the condition is true |
do...while | Repeats a block of statements while the condition is true |
for | Repeats a group of statements a specified number of times |
function | Definition of the function |
if | Conditionally executes a group of statements, depending on the value of an expression |
return | Exiting the script (function) with the possibility of returning a value from this function |
switch | Executes one of several groups of statements, depending on the value of an expression |
try...catch | Implements error handling |
var | Definition of variables |