From 694fe48e7f4a62fa03ced72690adfc2296cacb21 Mon Sep 17 00:00:00 2001 From: Boof <97455552+hexahigh@users.noreply.github.com> Date: Fri, 28 Apr 2023 10:19:00 +0200 Subject: [PATCH] e --- other/urls to array/index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/other/urls to array/index.js b/other/urls to array/index.js index 7aebe9a..029c69f 100644 --- a/other/urls to array/index.js +++ b/other/urls to array/index.js @@ -2,7 +2,10 @@ const textInput = document.getElementById("textInput"); const processButton = document.getElementById("processButton"); processButton.addEventListener("click", function () { - const inputText = textInput.value; - const lines = inputText.split(/[\n\r]+/); - console.log(lines); + const inputText = textInput.value; + const lines = inputText.split(/[\n\r]+/); + console.log(lines); + const arr = ['first', 'second', 'third']; + const modifiedArr = arr.map(i => '"' + i + '",'); + console.log(modifiedArr) });