Sunday, August 2, 2026
Latest:
  • Präsentation für b1
  • Verb “werden” Konjugation
  • In German, verb sein (to be) Konjunktion
  • Wichtige wörter für B1 prüfung
  • What are the main differences between ApplicationContext and BeanFactory?
Upokary

Upokary

Quality information

  • Health
  • Life
  • Fashion
  • Food
  • Code
  • English
  • বাংলা
Technology 

Write a program to print first 50 natural numbers using recursion.

Published: November 1, 2022 recursion

The following code will print the first 50 natural numbers using recursion:

    const printNumber = (num) => {
       if (num < 1) {
          return 1;
       }

       printNumber(num -1);
       console.log(num);
       return num;
    };

    printNumber(5)

You May Also Like

Second Largest Digit in a String

December 26, 2022 beroza

What are the differences between application server and a servlet container?

November 25, 2019 beroza

How to compare two objects in JavaScript?

August 28, 2021 beroza

Prefer dependency injection to hardwiring resources

January 22, 2020 beroza

Useful git command for developers

May 17, 2019 beroza

Directory structure of Mac OS X for beginner

August 16, 2019 beroza

What are the reasons of Kafka rebalancing?

May 7, 2020 beroza

Hooks can only be called inside the body of a function component

April 29, 2021 beroza

JenkinsX useful commands that developers should know.

May 5, 2020 beroza

Why Upokary?

Upokary.com is a useful application in everyday life. It provides very handy information regarding every aspect of life. Each and every tip of upokary.com is meant to make life better.

Upokary tools

  • Youtube thumbnail
  • Youtube video downloader

Useful Links

  • Handy code
  • Technology
  • People
  • Programming
  • Quote
  • Travel
  • WordPress
  • IELTS
  • Kids

Pages

  • Sitemap
  • Privacy policy
  • About us
  • Contact us

Support

For any kind of query or question please drop a message in the following email: upokary@gmail.com
Copyright © 2026 Upokary. All rights reserved.