Merge branch 'master' into removeFromArray-README-update

This commit is contained in:
Cody Loyd 2019-11-27 09:17:40 -06:00 committed by GitHub
commit 66c87fc01b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 3 deletions

View File

@ -19,6 +19,12 @@ describe('fibonacci', function() {
xit('doesn\'t accept negatives', function() { xit('doesn\'t accept negatives', function() {
expect(fibonacci(-25)).toEqual("OOPS"); expect(fibonacci(-25)).toEqual("OOPS");
}); });
xit('DOES accept strings', function() {
expect(fibonacci("1")).toEqual(1);
});
xit('DOES accept strings', function() {
expect(fibonacci("2")).toEqual(1);
});
xit('DOES accept strings', function() { xit('DOES accept strings', function() {
expect(fibonacci("8")).toEqual(21); expect(fibonacci("8")).toEqual(21);
}); });

View File

@ -12,4 +12,6 @@ the first test on this one is fairly easy, but there are a few things to think a
- how to remove a single element from an array - how to remove a single element from an array
- how to deal with multiple optional arguments in a javascript function - how to deal with multiple optional arguments in a javascript function
- [Check this link](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments). Scroll down to the bit about `Array.from` or the spread operator. - [Check this link](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments). Scroll down to the bit about `Array.from` or the spread operator. - [Or this link](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters).

View File

@ -1,6 +1,6 @@
# Exercise 02 - Reverse a String. # Exercise 02 - Reverse a String.
Pretty simple, write a function called `reverseString` that returns it's input, reversed! Pretty simple, write a function called `reverseString` that returns its input, reversed!
```javascript ```javascript
reverseString('hello there') // returns 'ereht olleh' reverseString('hello there') // returns 'ereht olleh'