@set : set « MS JScript « JavaScript Tutorial






Syntax

@set @varName = value

The @set property creates custom compiled variables.

The name of a custom variable must start with an ampersand character.

If the variable is used before being defined, its value will be NaN.

<html>
    <script language="JScript">
    <!--
    //Create a custom compiled variable called @number and set it to 25
    @set @number = 25;

    @if(@number == 25)
      document.write("Number is equal to ",@number);
    @else
      document.write("Number is not equal to 25.");
    @end
    -->
    </script>
</html>








32.27.set
32.27.1.@set