When we return to some code after doing something else for a while, it’s much easier to find information that is well-labeled. In a real project, most of the time is spent modifying and extending an existing code base rather than writing something completely separate from scratch. A quick glance at variable names can reveal which code was written by a beginner versus an experienced developer. Variable naming is one of the most important and complex skills in programming. Talking about variables, there’s one more extremely important thing.Ī variable name should have a clean, obvious meaning, describing the data that it stores. In other words, capital-named constants are only used as aliases for “hard-coded” values. But it’s still a constant because it doesn’t change after assignment. The value of pageLoadTime is not known prior to the page load, so it’s named normally. Const pageLoadTime = /* time taken by a webpage to load */
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |