I’ve encountered a peculiar behavior in the Codecademy code editor that I wanted to share and discuss. When using the “Format Code” feature, which is supposed to automatically tidy up the code, I’ve noticed that it changes string literals from using single quotes 'string' to double quotes "string". This caught my attention because the platform’s learning materials and best practices advocate for the use of single quotes for string literals.
This inconsistency could potentially confuse learners, especially beginners who rely on the platform’s guidance to form their coding habits. To better illustrate the issue, I’ve attached a screenshot displaying the inconsistency.
I’m curious to hear your thoughts on this and whether others have experienced the same. Also, if there’s a rationale behind this behavior that I’m missing, I’d appreciate any insights.
They might be easier to read. But this fix goes directly against what they recommend during the course. It’s not a matter of opinion, but rather a matter of consistency.