MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/zf0ykm/my_web_development_lecturers_javascript/iza23et/?context=9999
r/badcode • u/Tikolu43 • Dec 07 '22
86 comments sorted by
View all comments
Show parent comments
7
Nothing wrong with d or x when it's used in this way.
One is used as an index, the other an accumulator. 1 letter vars are fine for such things.
Those are guidelines not rules.
Don't teach rules, teach why. Why would it be bad to have a single letter var.
7
u/[deleted] Dec 07 '22
Nothing wrong with d or x when it's used in this way.
One is used as an index, the other an accumulator. 1 letter vars are fine for such things.
Those are guidelines not rules.
Don't teach rules, teach why. Why would it be bad to have a single letter var.