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

If/else clause does the same thing #4

Open
GEMI opened this issue Apr 7, 2014 · 3 comments
Open

If/else clause does the same thing #4

GEMI opened this issue Apr 7, 2014 · 3 comments

Comments

@GEMI
Copy link

GEMI commented Apr 7, 2014

if((length % 2) === 0){
start = word.slice(0, word.length/2);
end = word.slice(word.length/2, word.length);
} else{
start = word.slice(0, word.length/2);
end = word.slice(word.length/2, word.length);
}

@jeffp123
Copy link
Owner

jeffp123 commented Apr 7, 2014

It's probably something from the original code base where it was intended to split the words differently depending on whether there are an even or odd number of letters. Do you think it is necessary? If not, it should be modified.

@GEMI
Copy link
Author

GEMI commented Apr 7, 2014

Well I not sure, do you know some resource that would go into more technical details about how the center should be calculated?

@jeffp123
Copy link
Owner

jeffp123 commented Apr 7, 2014

I do not, sorry. The original base code came from this project:
https://github.com/Miserlou/OpenSpritz

It's a good catch though and I appreciate you contributing the suggestion.

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

No branches or pull requests

2 participants