Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

removing confusing use of hoisting #6207

Closed
wants to merge 1 commit into from
Closed

Conversation

Sequoia
Copy link
Contributor

@Sequoia Sequoia commented Feb 10, 2014

Why do

var ...
return exports;
function for exports...
another function for exports...

Why put return statement in the middle? This "hoisting hack" makes the code harder to read and will likely confuse beginners not familiar with the concept. Unless there's some really good reason to nest the return statement between properties & methods it should not be thus.

Why do
```
var ...
return exports;
function for exports...
another function for exports...
```
Why put return statement in the middle?  This "hoisting hack" makes the code harder to read and will likely confuse beginners not familiar with the concept.  Unless there's some really good reason to nest the return statement between properties & methods it should not be thus.
@mary-poppins
Copy link

I'm sorry, but I wasn't able to verify your Contributor License Agreement (CLA) signature. CLA signature is required for any code contributions to AngularJS.

Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match.

If you signed the CLA as a corporation, please let us know the company's name.

Thanks a bunch!

PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR.
PS2: If you are a Googler, please sign the CLA as well to simplify the CLA verification process.

@IgorMinar IgorMinar self-assigned this Feb 10, 2014
IgorMinar pushed a commit to IgorMinar/angular.js that referenced this pull request Feb 10, 2014
@IgorMinar IgorMinar closed this in ec900ca Feb 11, 2014
khepin pushed a commit to khepin/angular.js that referenced this pull request Feb 19, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants