Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81709 / JSCompiler.SyntaxHighlighter / test / test.js
blob: 537e59f02777c295c83a11e2c000213c43857c8e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
** This is a test function to demonstrate syntax highlighting!
*/
function myFunction() {
    var res = "";
    res = res +isNaN(123) + ": 123";
    res = res + isNaN(-1.23) + ": -1.23";
    res = res + isNaN(5-2) + ": 5-2";
    res = res + isNaN(0) + ": 0";
    res = res + isNaN('123') + ": 123
	";  
	//oops!
    res = res + isNaN(true) + ": true";
    res = res + isNaN(undefined) + ": undefined \
	nextString \
    ";
    res = res + isNaN('NaN') + ": NaN 'Hell no'";
    res = res + isNaN(NaN) + ': NaN \\n \';
    res = res + isNaN(0 / 0) + ": 0 / 0 \ ";

    document.getElementById("demo").innerHTML = res;
}
//Cool, it works!