GoToLoop
GoToLoop
Apparently method **resume()** can't be invoked when the _**Ani**_ **isEnded()**. Maybe replace **pause()** w/ **end()** and **resume()** w/ **start()**? :bulb:
You can always check for **isEnded()** or **isPlaying()** before invoking **resume()**. :star2:
> Declared all local variables using `let`. When we know a variable isn't supposed to be re-assigned we should declare it w/ `const` instead: https://developer.Mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const > `var drops = Array(n);`...
> Or should I leave them intact with `var`? If I can't change `var` to `const` I don't bother to change it to `let`. :stuck_out_tongue: > , but it doesn't...
> I kept using `var` for the examples, JIC. IMO keeping `var` is pretty much OK. Keyword `let` won't add anything that `var` already does. But I'd definitely change it...
> , but it prevents eval from directly accessing global vars and fns. Never mind! I wasn't aware js-turtle relied on **eval()**. :expressionless: But I was actually thinking about adding...
Oops! When I was navigating your diff. changes I didn't click the plus `+` sign to see more context of it. So I didn't catch neither the `e.key == 'ArrowDown'`...
Is it really necessary to use hard-#private fields and prevent tinkering for this kind of library? :(
> , it also makes it harder to accidentally mutate those private fields. Not harder, impossible! Compared to Java private, JS won't even allow reflection to work on those #properties!...
> ... when the indexed name matches a known property. Then I can rest assured that we can still continue to use unmatched index names? So we can still hack...