thejamesernator at gmail.com (2017-08-29T04:56:21.452Z)
What might be better is to extend break for named functions.
```
function someFn(arr) {
return arr.map(e => {
if(...) {
break someFn return "...";
}
return e * 2;
});
}
```
This way you know what you're breaking from.. super would imply one level
deep.. break already has some similar constructs. In this case it must be
a named function or named variable assigned a function. Not a reserved
word (break while, break for, etc already works)
What might be better is to extend break for named functions. function someFn(arr) { return arr.map(e => { if(...) { break someFn return "..."; } return e * 2; }); } This way you know what you're breaking from.. super would imply one level deep.. break already has some similar constructs. In this case it must be a named function or named variable assigned a function. Not a reserved word (break while, break for, etc already works) -- Michael J. Ryan - tracker1 at gmail.com - http://tracker1.info Please excuse grammar errors and typos, as this message was sent from my phone. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170828/0012a35b/attachment-0001.html>