diff --git a/other/urls to array/index.html b/other/urls to array/index.html
index 93b44a3..ba55e6d 100644
--- a/other/urls to array/index.html
+++ b/other/urls to array/index.html
@@ -1,11 +1,17 @@
-
-
-
-
-
-
- Process
-
+
+
+
+
+
+
+
+
+ Process
+ Output
+
+ Add Array to Textarea
+
+
\ No newline at end of file
diff --git a/other/urls to array/index.js b/other/urls to array/index.js
index 029c69f..b677d64 100644
--- a/other/urls to array/index.js
+++ b/other/urls to array/index.js
@@ -1,11 +1,19 @@
const textInput = document.getElementById("textInput");
const processButton = document.getElementById("processButton");
+var inputText = "NaN"
+var lines = "NaN"
+var modifiedArr = "NaN"
+
processButton.addEventListener("click", function () {
- const inputText = textInput.value;
- const lines = inputText.split(/[\n\r]+/);
+ inputText = textInput.value;
+ lines = inputText.split(/[\n\r]+/);
console.log(lines);
- const arr = ['first', 'second', 'third'];
- const modifiedArr = arr.map(i => '"' + i + '",');
+ modifiedArr = linus.map(i => '"' + i + '",');
console.log(modifiedArr)
});
+
+function addArrayToTextarea() {
+ const textarea = document.getElementById("myTextarea");
+ textarea.value = modifiedArr
+ }