DEV Community


Discussion on: Convert to 2 functions to one function

jmjjeena profile image
J E E N A R J U N Author

Thanks Derek :) I will test it out and let you know how it goes.

dinsmoredesign profile image
Derek D

Sure thing! My original idea was actually to just take any of your strings (assuming it's not an option that returns C or the large array from the default of E) and remove any index after 0 and return that inside an array, as something like W, W1 and W2 all map to the same value, but I don't know what the rest of your data looks like in order to do this.

P.S. Sorry you got downvoted on SO, people on there are so dumb :(