From 567a1200729c7ef29701824430071db2e6c451d1 Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Thu, 4 Apr 2024 00:07:51 +0200 Subject: [PATCH 1/2] Added korbit-tutorial-6cf36bdf9c6784f2/doWork.ts --- korbit-tutorial-6cf36bdf9c6784f2/doWork.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 korbit-tutorial-6cf36bdf9c6784f2/doWork.ts diff --git a/korbit-tutorial-6cf36bdf9c6784f2/doWork.ts b/korbit-tutorial-6cf36bdf9c6784f2/doWork.ts new file mode 100644 index 0000000..3910aad --- /dev/null +++ b/korbit-tutorial-6cf36bdf9c6784f2/doWork.ts @@ -0,0 +1,10 @@ +import { processWork } from 'korbit-tutorial-6cf36bdf9c6784f2/util.js'; + +function doSomeWork(workToBeDone: Array) { + let finishedWork = [] + workToBeDone.forEach((workItem) => finishedWork.push(processWork(workItem))) + return finishedWork +} + +let workToBeDone: Array = ["these", "are", "some", "words", null] +console.log(doSomeWork(workToBeDone)) \ No newline at end of file From 06f909677e4ff588946a2bcc9a44ee606c409e75 Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Thu, 4 Apr 2024 00:07:52 +0200 Subject: [PATCH 2/2] Added korbit-tutorial-6cf36bdf9c6784f2/util.ts --- korbit-tutorial-6cf36bdf9c6784f2/util.ts | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 korbit-tutorial-6cf36bdf9c6784f2/util.ts diff --git a/korbit-tutorial-6cf36bdf9c6784f2/util.ts b/korbit-tutorial-6cf36bdf9c6784f2/util.ts new file mode 100644 index 0000000..205310c --- /dev/null +++ b/korbit-tutorial-6cf36bdf9c6784f2/util.ts @@ -0,0 +1,3 @@ +export function processWork(workItem: string) { + return workItem.split("").reverse().join(""); +} \ No newline at end of file