Skip to content

Commit

Permalink
Merge pull request mre#80 from ihsansatriawan/reverse_string_js
Browse files Browse the repository at this point in the history
Add solution reverse string problem with JS language
  • Loading branch information
mre authored Nov 15, 2018
2 parents 234ce04 + 9138e37 commit fb242de
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions problems/reverse-string/reverse-string.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const reverse_string = (word) => {
if (typeof word === 'string') {
return word.split("").reverse().join("")
} else {
return "Must String!"
}
}

reverse_string("Hello World")

0 comments on commit fb242de

Please sign in to comment.