{
// 重点是要理解到第n级台阶的跳法等于第n-1阶跳法与第n-2阶跳法之和
if(number === 1) return 1
else if(number === 2) return 2
else return jumpFloor(number - 1) + jumpFloor(number - 2)
}
module.exports = {
jumpFloor : jumpFloor
};
{
// 重点是要理解到第n级台阶的跳法等于第n-1阶跳法与第n-2阶跳法之和
if(number === 1) return 1
else if(number === 2) return 2
else return jumpFloor(number - 1) + jumpFloor(number - 2)
}
module.exports = {
jumpFloor : jumpFloor
};