chapter 5: add initial samples

This commit is contained in:
Beth Griggs
2020-04-13 15:49:16 +01:00
parent 583e10b98e
commit 503edc4ec2
90 changed files with 4716 additions and 1039 deletions
+8
View File
@@ -0,0 +1,8 @@
module.exports = reverse
function reverse (sentence) {
const wordsArray = sentence.split(' ')
const reversedArray = wordsArray.reverse()
const reversedSentence = reversedArray.join(' ')
return reversedSentence
};