8000 Initial Commit · rhawkenson/javascript-exercises@487817c · GitHub
[go: up one dir, main page]

Skip to content

Commit 487817c

Browse files
committed
Initial Commit
1 parent 5e388e8 commit 487817c

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

removeFromArray/removeFromArray.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ const removeFromArray = function() {
33
}
44

55
module.exports = removeFromArray
6+

removeFromArray/removeFromArray.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ describe('removeFromArray', function() {
2323
expect(removeFromArray([1, 2, 3], "1", 3)).toEqual([1, 2]);
2424
});
2525
});
26+

reverseString/reverseString.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const reverseString = function(text) {
22
let string ='';
3-
for (let i=text.length-1; i>0; i--){
4-
string += text.splice([i]);
3+
for (let i=text.length-1; i>=0; i--){
4+
string += text.charAt([i]);
55
} return string;
66
}
77

reverseString/reverseString.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ describe('reverseString', function() {
55
expect(reverseString('hello')).toEqual('olleh');
66
});
77

8-
xit('reverses multiple words', function() {
8+
it('reverses multiple words', function() {
99
expect(reverseString('hello there')).toEqual('ereht olleh')
1010
})
1111

12-
xit('works with numbers and punctuation', function() {
12+
it('works with numbers and punctuation', function() {
1313
expect(reverseString('123! abc!')).toEqual('!cba !321')
1414
})
15-
xit('works with blank strings', function() {
15+
it('works with blank strings', function() {
1616
expect(reverseString('')).toEqual('')
1717
})
1818
});

0 commit comments

Comments
 (0)
0