diff --git a/index.html b/index.html new file mode 100644 index 0000000..825ea0d --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + + Reverse String + + + + + + + \ No newline at end of file diff --git a/rstring.js b/rstring.js new file mode 100644 index 0000000..b0064e6 --- /dev/null +++ b/rstring.js @@ -0,0 +1,9 @@ +function reverseString(str) { + let rString = ""; + for (let i = str.length - 1; i >= 0; i--) { + rString += str[i]; +} + return rString; +}; + +console.log(reverseString("Hasina")); \ No newline at end of file