4 ms·
If you have a stack machine, when you write a function like this. function foo() { let x = 1; let y = 2; x + y; } Your code al
by joesb 8y ago
If you have a stack machine, when you write a function like this.
function foo() {
let x = 1;
let y = 2;
x + y;
}
Your code already depends on ordering. x is on the stack first. y is on the stack second.
You don't randomly rewrite this two lines of code on every invocation of foo.
`let x = 1` and `let [x] = useState(1)` is the exact same thing.
- deleted 8y ago[deleted]