Nodejs

No description

fork
loading
Files
  • index.js
index.js
1
2
3
4
5
6
function isFibo(valueToCheck, previousValue = 0, currentValue = 1) {
    return currentValue > valueToCheck ? false : valueToCheck == currentValue ? true : isFibo(valueToCheck, previousValue + currentValue, currentValue);
}

isFibo(34);
node v10.16.0