What are the rules of good and bad variables name?

1 answer

Answer

1056021

2026-07-28 14:15

+ Follow

Good variable names should be descriptive, concise, and follow a consistent naming convention, such as using camelCase or snake_case, to enhance readability. They should avoid using reserved keyWords and special characters, and not start with a number. Bad variable names, on the other hand, are typically vague, overly abbreviated, or misleading, which can lead to confusion and make the code harder to maintain. Additionally, using single-letter names (except in specific contexts like loop counters) can hinder understanding of the code's purpose.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.