a2da4df8009d47c747a398d7536d97e2f5cd7f43
[platform/framework/web/crosswalk-tizen.git] /
1 if(true)
2 {
3   doStuff()
4 }
5
6 if(foo || bar)
7 {
8   if(bar === 'bar')
9   {
10     // nested
11     log('nested if');
12   }
13   else
14   {
15     log('nested else')
16   }
17 }
18 else if(baz == null)
19 {
20   // else if
21   log('elseif');
22 }
23 else
24 {
25   // else
26   log('else');
27   // should keep the 2 empty lines
28
29
30 }
31
32 if(singleLine) singleLine();
33
34
35 // it's a trap!
36 if(asi && noBraces)
37   dolor()
38 else
39   amet();
40
41
42
43 // issue #34 (break line comment into individual line)
44 if(window.DOMParser)
45 { // Standard
46   tmp = new DOMParser();
47   xml = tmp.parseFromString(data, "text/xml");
48 }
49 else
50 { // IE
51   xml = new ActiveXObject("Microsoft.XMLDOM");
52   xml.async = "false";
53   xml.loadXML(data);
54 }
55
56
57 // issue #196
58 if(a)
59   a(); // run a
60 else if(b)
61   b(); // run b
62 else
63 {
64   c(); // run c
65 }