Challenge 13 Complete, but question about 'confusing pluses' feedback


For Challenge 13, you want to convert the column number back to a letter. I originally had something that was like ConvertToChar(columnNumber+numberOffset). But that didn’t work because it treated the two numbers like strings so instead of 1+1 = 2, it was 1+1 = 11. I saw something that said you can force a string to a number by putting a ‘+’ in front, so I changed it to ConvertToChar(+columnNumber+ +numberOffset) and that fixed the problem, everything worked fine and I got the challenge complete. But in the code, it now has a warning sign and says “Confusing Plusses”

I guess this is just my unfamiliarity with javascript… What is the accepted way to do this?


Those seem much clunkier than just using the ‘+’…


I would usually go with the ones you listed as a way to convert strings to numbers as they are more human readable. I know they are clunkier but the first approach you tried might throw off people reading your code if they don’t know that you’re just forcing a string to be a number.

Also, it’s a warning. I’d say they’re also running some linter on our code so that we get into the habit of writing human readable code.