function squareDist(x, y) {
function square(num) {
return num * num;
}
return square(x) + square(y);
}
square
ReferenceError: Can't find variable: square
squareDist(2, 3)
13
function outer() {
function inner() {
return 4711;
}
inner.count = (inner.count || 0) + 1;
return inner.count;
}
outer()
1
outer()
1
The console allows you to interact with the course material and examples. Use the following keys:
A special logging function is also available: