Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions korbit-tutorial-6cf36bdf9c6784f2/doWork.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { processWork } from 'korbit-tutorial-6cf36bdf9c6784f2/util.js';

function doSomeWork(workToBeDone: Array<string>) {
let finishedWork = []
workToBeDone.forEach((workItem) => finishedWork.push(processWork(workItem)))
return finishedWork
}

let workToBeDone: Array<string> = ["these", "are", "some", "words", null]
console.log(doSomeWork(workToBeDone))
3 changes: 3 additions & 0 deletions korbit-tutorial-6cf36bdf9c6784f2/util.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function processWork(workItem: string) {
return workItem.split("").reverse().join("");
}