You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Web-Dev-For-Beginners/translations/en/7-bank-project/3-data/assignment.md

2.3 KiB

Refactor and comment your code

Instructions

As your codebase grows, it's essential to refactor your code regularly to ensure it remains readable and maintainable over time. Add comments and refactor your app.js to enhance the quality of the code:

  • Extract constants, such as the server API base URL.
  • Consolidate similar code: for instance, you can create a sendRequest() function to centralize the code used in both createAccount() and getAccount().
  • Reorganize the code to improve readability, and include comments.

Rubric

Criteria Outstanding Satisfactory Needs Improvement
Code is well-commented, organized into clear sections, and easy to follow. Constants are extracted, and a consolidated sendRequest() function has been created. Code is clean but could benefit from additional comments, constant extraction, or consolidation. Code is disorganized, lacks comments, constants are not extracted, and code is not consolidated.

Disclaimer:
This document has been translated using the AI translation service Co-op Translator. While we aim for accuracy, please note that automated translations may include errors or inaccuracies. The original document in its native language should be regarded as the authoritative source. For critical information, professional human translation is advised. We are not responsible for any misunderstandings or misinterpretations resulting from the use of this translation.