/recursion

Primary LanguageJavaScript

Recursion

Live Demo

Purpose

Practice using recursions to write fibonacci and merge sort algorithms.

  • function fibsRec() takes a positive integer as an argument and returns an array containing that many numbers from the Fibonacci sequence.

  • function mergeSort() takes an array of numbers and returns an array with the numbers sorted from low to high.

Testing

To run the functions with your own arguments, open the console and run fibsRec(argument) or mergeSort(argument), replacing argument with your own.