Skip to main content

Closures

If you need more complex logic to initialize your variables you might want to reach for a closure expression.

knot
const result = {
let lhs = 90;
let rhs = {
let initial = 4;
123 - initial;
};
lhs * 10 > rhs;
};
knot
const result = {
let lhs = 90;
let rhs = {
let initial = 4;
123 - initial;
};
lhs * 10 > rhs;
};