spray
spray copied to clipboard
If/else clause does the same thing
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); }
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.
Well I not sure, do you know some resource that would go into more technical details about how the center should be calculated?
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.