Skip to content

Commit 0f62e93

Browse files
committed
Add code comments
1 parent 076470d commit 0f62e93

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test-harness/models/TaskService.cfc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,23 @@ component singleton {
22

33
function init() {
44
variables.tasks = [];
5+
// You can initialize any data or perform setup here
56
}
67

78
function addTask( task ) {
89
variables.tasks.append( arguments.task );
10+
// This function adds a new task to the tasks array
911
}
1012

1113
function deleteTask( task ) {
1214
variables.tasks.delete( arguments.task );
15+
// This function removes a task from the tasks array
1316
}
1417

1518
function getTasks() {
19+
// Simulates a delay, like fetching data from a database
1620
sleep( 3000 );
21+
// Returns the current list of tasks
1722
return variables.tasks;
1823
}
1924

0 commit comments

Comments
 (0)