diff --git a/index.html b/index.html new file mode 100644 index 0000000..9e7e942 --- /dev/null +++ b/index.html @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..fefc5e0 --- /dev/null +++ b/script.js @@ -0,0 +1,10 @@ +function reverseString(str) { + str = String(str); + let original = Array.from(str); + let opposite = []; + for(let i = 0; i < original.length; i++) { + opposite.unshift(original[i]); + } + opposite = opposite.join('').trim(); + return opposite; +} \ No newline at end of file