Q1. Guess the output
function foo() {
 let a = b = 0;
 a++;
 return a;
}
console.log(foo());
console.log(typeof(a)); // => ???
console.log(typeof(b));

Вдохните, не прыгайте в решение

Вывод:
1
неопределенное
число

Q2. Guess the output
function mul (x) {
 return function (y) { // anonymous function
 return function (z) { // anonymous function
 return x * y * z;
 };
 };
}
console.log(mul(2)(3)(4)); // output : 24
console.log(mul(4)(3)(4));

Вдохните, не прыгайте в решение

Выход:
24
48