Merge branch 'master' of TOP/javascript-exercises

This commit is contained in:
Michael Frank
2021-05-09 00:29:44 +12:00
2932 changed files with 302449 additions and 87 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
const reverseString = function() {
var reverseString = function(string) {
return string.split('').reverse().join('')
}
module.exports = reverseString
+2 -5
View File
@@ -5,14 +5,11 @@ describe('reverseString', function() {
expect(reverseString('hello')).toEqual('olleh');
});
xit('reverses multiple words', function() {
it('reverses multiple words', function() {
expect(reverseString('hello there')).toEqual('ereht olleh')
})
xit('works with numbers and punctuation', function() {
it('works with numbers and punctuation', function() {
expect(reverseString('123! abc!')).toEqual('!cba !321')
})
xit('works with blank strings', function() {
expect(reverseString('')).toEqual('')
})
});