LoginSignup
0
0

【再帰とは】明日から本気出す

Last updated at Posted at 2024-04-26
function 明日から本気出す(dayCount = 1, maxDayCount = 810) {
  if (dayCount >= maxDayCount) {
    console.log(`${dayCount}日目:来世から本気出す`);
    return;
  }
  console.log(`${dayCount}日目:明日から本気出す`);
  明日から本気出す(dayCount + 1, maxDayCount);
}

明日から本気出す();
0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0