Your Submissions
You haven't submitted any code for this challenge yet. Solve the problem by passing all the test cases, and your submissions will appear here.
xxxxxxxxxx
36
var assert = require('assert');
/*
* @param {number} n The Fibonacci number to get.
* @returns {number} The nth Fibonacci number
*/
function fibonacci(num) {
// fill this in
return num;
}
try {
assert.equal(fibonacci(1), 1);
console.log('PASSED: ' + '`fibonacci(1)` should return `1`');
} catch (err) {
console.log(err);
}
try {
assert.equal(fibonacci(17), 1597);
console.log('PASSED: ' + '`fibonacci(17)` should return `1597`');
} catch (err) {
console.log(err);
}
OUTPUT
Results will appear here.