We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 076470d commit 0f62e93Copy full SHA for 0f62e93
test-harness/models/TaskService.cfc
@@ -2,18 +2,23 @@ component singleton {
2
3
function init() {
4
variables.tasks = [];
5
+ // You can initialize any data or perform setup here
6
}
7
8
function addTask( task ) {
9
variables.tasks.append( arguments.task );
10
+ // This function adds a new task to the tasks array
11
12
13
function deleteTask( task ) {
14
variables.tasks.delete( arguments.task );
15
+ // This function removes a task from the tasks array
16
17
18
function getTasks() {
19
+ // Simulates a delay, like fetching data from a database
20
sleep( 3000 );
21
+ // Returns the current list of tasks
22
return variables.tasks;
23
24
0 commit comments