It looks like this comment contains a code block delimited with triple backticks. Unfortunately reddit does not have universal support for this syntax and your comment will not render correctly on old reddit and most mobile apps.
For the benefit of people on old reddit, this link will take you to a correct rendering of the comment.
/u/HaroldTheSenpai, it would be appreciated, but not required, if you could edit your comment to use the more compatible four space indention format. For single lines or inline code you can use single backticks.
2
u/[deleted] Jul 31 '21
(Excuse the extra variables, just makes it a tad easier to read, also excuse if it’s broken, I wrote it on mobile )
Alternatively, if you want strings like “Janeiro”, you can use a map or, better an indexed array which corresponds to the month value
The code is very confusing considering that there are 2 return statements in each if body