Echo JS 0.11.0

<~>

MaxArt comments

MaxArt 1463 days ago. link 2 points
PSA: use only #2.
If you *really* need it, put a warning comment for #1.
Avoid #3 (unless you're generating code), and for #4 use Number rather than an easy-to-miss unary operator.
MaxArt 1471 days ago. link 1 point
"Threats"? Isn't "risks" a better term here?
MaxArt 1476 days ago. link 2 points
Even if it's something free, it's still SPAM.
MaxArt 1476 days ago. link 2 points
There's a misunderstanding: I mainly use `slice` too. I only use `substr` if I have the length of the substring I need. That's its added value.

What I stopped using altogether is `substring`.
MaxArt 1481 days ago. link 1 point
substring and slice are the same for most cases (the differences are explained in the article). The *real* alternative is substr.
MaxArt 1481 days ago. link 1 point
The second technique doesn't actually remove the property: it creates another object without a property. It's widely used if immutability is a constraint.

If you want another proper way, you can use Reflect.deleteProperty.
[more]