Closed aleclarson closed 5 years ago
Hm, somehow these got dropped when I was moving everything into markdown
And if you need to bind some variable(s) to scope:
let a = 2
let b = 16
let c = fn (a, b) {
while (--a >= 0) { b /= 2 }
b
}(a, b)
assert(a == 2) // `a` and `b` are unchanged out here
assert(b == 16)
assert(c == 4)
do {}
and do async {}
have been added back https://github.com/jamiebuilds/ghost-lang#do
WDYT of
do
blocks (basically lighter IIFEs)?