From 347511516bec7f252c973636bf6a3c69e1e1fe1c Mon Sep 17 00:00:00 2001 From: Christian James Welly Date: Fri, 24 May 2019 08:23:24 +0800 Subject: [PATCH 1/4] Add more tests for fibonacci --- fibonacci/fibonacci.spec.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fibonacci/fibonacci.spec.js b/fibonacci/fibonacci.spec.js index d7adebe..cafe796 100644 --- a/fibonacci/fibonacci.spec.js +++ b/fibonacci/fibonacci.spec.js @@ -19,6 +19,12 @@ describe('fibonacci', function() { xit('doesn\'t accept negatives', function() { 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() { expect(fibonacci("8")).toEqual(21); }); From 166baafbebb84205f44629a7a14c0855d880eecf Mon Sep 17 00:00:00 2001 From: Nikolas Broman <43938831+nikolasbroman@users.noreply.github.com> Date: Sat, 13 Jul 2019 13:07:37 +0300 Subject: [PATCH 2/4] Fix typo --- reverseString/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reverseString/README.md b/reverseString/README.md index 578adc1..34f464b 100644 --- a/reverseString/README.md +++ b/reverseString/README.md @@ -1,6 +1,6 @@ # 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 reverseString('hello there') // returns 'ereht olleh' From 46a36d8d0939eb07cafb5e5f7bbc26562cd59923 Mon Sep 17 00:00:00 2001 From: Uzay G <52892257+Uzay-G@users.noreply.github.com> Date: Mon, 12 Aug 2019 08:48:12 +0000 Subject: [PATCH 3/4] Added ...rest parameters as a link to deal with optional parameters Rest parameters are already arrays unlike 'arguments' and they can be used in arrow expressions. Just find it a bit simpler --- removeFromArray/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/removeFromArray/README.md b/removeFromArray/README.md index 44ee922..830a9ce 100644 --- a/removeFromArray/README.md +++ b/removeFromArray/README.md @@ -13,3 +13,5 @@ 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 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. + - [Or this link](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). + From 3d71a9ac1f16ad3376acffa50ef1f95088e73f93 Mon Sep 17 00:00:00 2001 From: Michael Horn Date: Sat, 17 Aug 2019 13:02:22 -0700 Subject: [PATCH 4/4] Fix code indentation on helloWorld README.md --- helloWorld/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helloWorld/README.md b/helloWorld/README.md index cb5114c..8b30771 100644 --- a/helloWorld/README.md +++ b/helloWorld/README.md @@ -13,7 +13,7 @@ Let's look at the spec file first: const helloWorld = require('./helloWorld'); describe('Hello World', function() { - it('says hello world', function() { + it('says hello world', function() { expect(helloWorld()).toEqual('Hello, World!'); }); });