Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1165a9c

Browse files
authoredOct 2, 2024··
Create Naming Conventions Best Practice
Stick to Consistent Naming Conventions for Variables, Functions, and Files to Ensure Readability and Ease of Future Modifications.
1 parent a5d8906 commit 1165a9c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
 

‎Naming Conventions Best Practice

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Best Practice: Stick to Consistent Naming Conventions for Variables, Functions, and Files to Ensure Readability and Ease of Future Modifications may be Camel notation or _ notation.
2+
Why important: In ServiceNow development, adopting consistent naming conventions is crucial to maintaining code that is both readable and easily modifiable in the future. Whether you're writing scripts, creating workflows, developing UI actions, or configuring integrations, standardized naming
3+
Ecample with out naming convensions:
4+
var sD = rec.getValue('planned_start_date');
5+
var eD = rec.getValue('planned_end_date');
6+
return 'Start Date: ' + sD + ', End Date: ' + eD;
7+
Example with naming convensions:
8+
var plannedStartDate = changeRequestRecord.getValue('planned_start_date');
9+
var plannedEndDate = changeRequestRecord.getValue('planned_end_date');
10+
return 'Start Date: ' + plannedStartDate + ', End Date: ' + plannedEndDate;
11+
Conclution:Following Naming conventions increase Readability,Maintainability and Scalability of out script.

0 commit comments

Comments
 (0)
Please sign in to comment.