Comments

Comments are not executed and are used to help explain your code. Commenting your code is good practice. EV Script supports both single and multi-line comments. 

Single line comments

Single line comments start with //. Any text between // and the end of a line, will be ignored.
<?ev
    // Create a new welcoming variable
    var a = 'Hello World!';
    var b = a; // reassign it
?>

Multi-line comments

Multi-line comments start with /* and end with */. Any text between /*and */ will be ignored.

<?ev
    /*
        Multi-line comments
        are also supported
    */
    var a = 'Hello World!';
?>

Using comments to prevent execution

If you're anything like us there'll be plenty of instances where you want to test different code. EV Script allows you to comment out code to prevent it from executing in both single or multi line formats.

<?ev
    // single line example
    // var a = 'Hello World!';
    var a = 'Hey you!';
    
    // stop an entire block
    /*
        var year = 2015;
        var b = 'Goodbye ' + year + '!';
        print(b);
    */
?>