From a5d89068360b7d44268a2cfab07b0873c996a5c0 Mon Sep 17 00:00:00 2001 From: Rampriya <114834474+Rampriya-S@users.noreply.github.com> Date: Tue, 1 Oct 2024 20:30:58 -0400 Subject: [PATCH 1/2] Create Naming conventions Stick to consistent naming conventions for variables, functions, and files to ensure readability and ease of future modifications. --- Naming conventions | 1 + 1 file changed, 1 insertion(+) create mode 100644 Naming conventions diff --git a/Naming conventions b/Naming conventions new file mode 100644 index 0000000..8159b94 --- /dev/null +++ b/Naming conventions @@ -0,0 +1 @@ +Stick to consistent naming conventions for variables, functions, and files to ensure readability and ease of future modifications. From 1165a9c534d7ed1e6930b0884cb7d5f6fff58c19 Mon Sep 17 00:00:00 2001 From: Rampriya <114834474+Rampriya-S@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:08:56 -0400 Subject: [PATCH 2/2] Create Naming Conventions Best Practice Stick to Consistent Naming Conventions for Variables, Functions, and Files to Ensure Readability and Ease of Future Modifications. --- Naming Conventions Best Practice | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Naming Conventions Best Practice diff --git a/Naming Conventions Best Practice b/Naming Conventions Best Practice new file mode 100644 index 0000000..0ecbee8 --- /dev/null +++ b/Naming Conventions Best Practice @@ -0,0 +1,11 @@ +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. +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 +Ecample with out naming convensions: + var sD = rec.getValue('planned_start_date'); + var eD = rec.getValue('planned_end_date'); + return 'Start Date: ' + sD + ', End Date: ' + eD; +Example with naming convensions: + var plannedStartDate = changeRequestRecord.getValue('planned_start_date'); + var plannedEndDate = changeRequestRecord.getValue('planned_end_date'); + return 'Start Date: ' + plannedStartDate + ', End Date: ' + plannedEndDate; +Conclution:Following Naming conventions increase Readability,Maintainability and Scalability of out script.