From 6dbe814cc35123e21bca42bb663ba83e1a91772d Mon Sep 17 00:00:00 2001 From: Shelley McIntyre <73217296+SLMcIntyre@users.noreply.github.com> Date: Thu, 3 Dec 2020 10:09:33 -0500 Subject: [PATCH] reverse strings challenge --- .vscode/settings.json | 3 +++ index.html | 11 +++++++++++ string.js | 10 ++++++++++ 3 files changed, 24 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 index.html create mode 100644 string.js diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..f673a71 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5502 +} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..e6e0a98 --- /dev/null +++ b/index.html @@ -0,0 +1,11 @@ + + + + + + Document + + + + + \ No newline at end of file diff --git a/string.js b/string.js new file mode 100644 index 0000000..7a48279 --- /dev/null +++ b/string.js @@ -0,0 +1,10 @@ +function reverseString(str) { + let rString = ""; + for (i= str.length - 1; i>= 0; i--){ + rString+=str[i]; + } + return rString; +} + +reverseString ('Hello'); +reverseString('SuperDeeDuper'); \ No newline at end of file