Generator getter method

Rick Waldron waldron.rick at gmail.com
Tue Nov 10 23:50:12 UTC 2015


On Tue, Nov 10, 2015 at 2:28 PM Mohsen Azimi <me at azimi.me> wrote:

>
> for (let corner of rectangle.getCorners()) {
>   console.log(corner);
> }
> ```
>
> for (let corner of rectangle.corners) {
>   console.log(corner);
> }
> ```
>
> Which seems cleaner
>

Either could've been called "corners" and then the only difference is the
invocation parens.


Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20151110/48f305ef/attachment.html>


More information about the es-discuss mailing list