spray icon indicating copy to clipboard operation
spray copied to clipboard

If/else clause does the same thing

Open GEMI opened this issue 11 years ago • 3 comments

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); }

GEMI avatar Apr 07 '14 14:04 GEMI

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.

jeffp123 avatar Apr 07 '14 14:04 jeffp123

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

GEMI avatar Apr 07 '14 15:04 GEMI

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.

jeffp123 avatar Apr 07 '14 15:04 jeffp123