You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Semicolons:
Many semicolons are ommitted, that's fine by me - I know where they should be - but for beginners (a good part of the target audience?) I think it's confusing to put them in this place but not there ... what about putting all semicolons? It's even inconsistent other than that: e.g. why no semicolon after the last expression within a function like the inner one from once but in mapWith all semicolons are there?
Whitespace:
For my taste the space between function name and argument list is hard to follow - the arguments don't seem to belong - maybe i'm just too acustomed to Crockford's code conventions.
Parens on IIFEs:
I always found that putting the closing paren on IIFEs around the whole expression made it clearer that the thingy belongs together somehow - again that's probably a matter of taste
undefined:
Again, I know that (void 0) is undefined, but to someone who's new to the language - and also to me - it seems overly confusing, why not adapt the style many libraries use:
(function (undefined) {
// some code ...
}());
undefined reads undefined but can not be overridden from somewhere outside, of course there is the chance to modify it accidently within your code ...
I'd be happy to make the modifications in case you want to incorporate some of the ideas.
The text was updated successfully, but these errors were encountered:
Many semicolons are ommitted, that's fine by me - I know where they should be - but for beginners (a good part of the target audience?) I think it's confusing to put them in this place but not there ... what about putting all semicolons? It's even inconsistent other than that: e.g. why no semicolon after the last expression within a function like the inner one from once but in mapWith all semicolons are there?
For my taste the space between function name and argument list is hard to follow - the arguments don't seem to belong - maybe i'm just too acustomed to Crockford's code conventions.
I always found that putting the closing paren on IIFEs around the whole expression made it clearer that the thingy belongs together somehow - again that's probably a matter of taste
Again, I know that (void 0) is undefined, but to someone who's new to the language - and also to me - it seems overly confusing, why not adapt the style many libraries use:
undefined reads undefined but can not be overridden from somewhere outside, of course there is the chance to modify it accidently within your code ...
I'd be happy to make the modifications in case you want to incorporate some of the ideas.
The text was updated successfully, but these errors were encountered: