what does this comment /*@cc_on!@*/0 do inside an if statement in javascript?

@cc_on Statement is the conditional compilation flag for IE(< 11) browser

@cc_on Statement (JavaScript)

Activates conditional compilation support within comments in a script.

Caution

Conditional compilation is not supported in Internet Explorer 11
Standards mode and Windows Store apps. Conditional compilation is
supported in Internet Explorer 10 Standards mode and in all earlier
versions.

/*@cc_on @*/
/*@
    document.write("JavaScript version: " + @_jscript_version + ".");
    document.write("<br />");
    @if (@_win32)
        document.write("Running on the 32-bit version of Windows.");
    @elif (@_win16)
        document.write("Running on the 16-bit version of Windows.");
    @else
        document.write("Running on a different operating system.");
    @end
@*/

so

if(!/*@cc_on!@*/0)

If your browser doesn’t know conditional compilation (other than IE < 11), the expression will be:

if(!0) // ==> TRUE

otherwise it will be:

if(!!0) // ==> FALSE

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)