tc39 / proposal-slice-notation

http://tc39.es/proposal-slice-notation/
MIT License
526 stars 19 forks source link

Improve ruby examples in README #50

Open lionel-rowe opened 11 months ago

lionel-rowe commented 11 months ago
hax commented 11 months ago

@lionel-rowe Thank you for the PR.

Choose values that give different results for the two syntaxes

Actually, I'm not sure, but maybe the original author intentionally used an example with the same result?

lionel-rowe commented 11 months ago

Actually, I'm not sure, but maybe the original author intentionally used an example with the same result?

Not sure what the intention was, but I found it confusing as an illustration of the difference given that they yield the same result. By analogy, if you were trying to explain addition and multiplication to someone who had never heard of those concepts, you probably wouldn't choose 2 and 2 as operands to illustrate the difference between the two.