mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-06-05 15:09:09 +09:00
Merge branch 'master' into removeFromArray-README-update
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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!');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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 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).
|
||||
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user