Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve this line #2323

Closed
ajax333221 opened this issue Aug 15, 2012 · 1 comment
Closed

Improve this line #2323

ajax333221 opened this issue Aug 15, 2012 · 1 comment

Comments

@ajax333221
Copy link

frameHeight = frameHeight !== undefined ? frameHeight : 24;

can be rewritten safely to:

if(frameHeight===undefined)frameHeight=24;

Benefits:
-more readable
-performs better (I believe) since its value will only change when needed

Sorry that I don't know the exact line number, I just read this line from this question

@mrdoob
Copy link
Owner

mrdoob commented Aug 15, 2012

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants