/RecursiveJs

Exercises for recursion in Js

Primary LanguageJavaScript

Project: Recursion

This is a TOP (The Odin Project) task on CS (Computer Science) basics, especifically Recursion.

Content

This repository contains two folders:

fibs_rec
merge_sort

The fibs_rec folder contains a fibbonacci function that takes a number and returns an array containing that many numbers from the fibonacci sequence. Using an example input of 8, this function should return the array [0, 1, 1, 2, 3, 5, 8, 13, 21].

The merge_sort folder contains a function that takes in an array and returns a sorted array, using a recursive merge sort methodology.

Getting a copy

If you want to get a copy of this repository, you can clone it:

git clone git@github.com:fideldemoz/RecursiveJs.git

Alternatively, you can clone it.

Testing

Before testing, you need to install the dependencies, ssuming that you have node installed.

npm install

Then Run:

npm test

Additionally, you can edit the .test.js files to customize the tests.
Happy Coding!

tested with jest