tc39 / proposal-array-last

A JavaScript TC39 Proposal for getting the last element from an array
311 stars 13 forks source link

README code sample typo #10

Closed atticoos closed 6 years ago

atticoos commented 6 years ago

newLen in the set polyfill example was not defined.

I believe this is what it was getting at.. Let me know if i should avoid the ternary and go back to the if statement.

keithamus commented 6 years ago

I know it sounds picky, but I would like to split out the ternary. Ideally I'd like it to match spec as closely as it can so we can spot any bugs between the two.

ljharb commented 6 years ago

@keithamus you may find it helpful to use https://npmjs.com/es-abstract to represent existing abstract operations, to match the spec even more closely :-D

keithamus commented 6 years ago

:+1: happy to do that

keithamus commented 6 years ago

Fixed in 6b116d16fbd19a7ce8d20a12791e675fa5b0e345

Thanks for the PR @ajwhite!