Wiki source code of JS test: Code

Last modified by Sergiu Dumitriu on 2018/10/10 17:05

Show last authors
1 {{info}}**Question:** What will happen when the following code is executed?
2
3 {{code language="javascript"}}
4 var a = 7;
5 var b = 5;
6 var c = 0;
7 if (a - b > 2) {
8 c = 100;
9 } else {
10 c = 50 * a + b;
11 }
12 {{/code}}{{/info}}