Version:
  1. Examples of scripting in JavaScript

    Article: AN0002166 Updated: 03.12.2018 Displayed: 574x

    Following examples show particular possibilities of programming in ObjectGears system using JavaScript.

    For further information to JavaScript language we recommend web https://www.w3schools.com/js/default.asp.

     

    Text strings

    Texts are written in single or double quotzations: "John Dew" or 'John Dew'.

    Comments

    Single line comments starts with //.

    Example:

    var y = 3 // declaring y and giving it value 3

    Multi line comments begin with /* end end with */.

    Example:

    /*

    This is a comment

    to the following code...

    */.

    You can use comments also to deactivate parts of your code.

    Aritmetic operators 

    Operator Description
    + Addition
    - Subtraction
    * Multiplication
    / Division
    % Modulus (Remainder)
    ++ Increment
    -- Decrement

     Comparison operators 

     

    Operator Description
    == equal to
    === equal value and equal type
    != not equal
    !== not equal value or not equal type
    > greater than
    >= greater than or equal to
    < less than
    <= less than or equal to
    ? ternary operator

    Logical operators 

    Operator Description
    && logical AND
    || logical OR
    ! logical NOT

    Operator for concatenating text strings

    Operator Description
    + concatenates two strings

    Example: 'John' + ' ' + 'Dew' = 'John Dew'

  2.    ---
    Your rating:
    Rated by users: 0x
  3. Top
SearchTitle
×