Skip to main content

Program to display Hello World one hundred times using javascript

Program to display Hello World

In this section, you will learn how you can easily display or print 'Hello World' message one or more then ones times in javascript. In this example, we print 100 times.

Let's try to create a simple program :

  ➤ Code : hello-world program;

<script>
 //Enter your number here, as often as you want to print. 
   let times = 100;
   for(let i = 1; i<=times; i++) {
        console.log(i+". Hello word!");
    }   
<script>

Comments

Popular Posts

Django static files not working when debug false || debug true

# Django static and media files not working when debug is false In this article you will learn how to fix problem of not loading static files and media in Django even the DEBUG is FALSE. This is the easiest and safest solution. # Problem: Django static and media files not working when debug is false  ➤ Code: settings.py DEBUG = False #True ALLOWED_HOSTS = [ '*' ] #Host name # Problem Fix: Let's see, How you can fix the problem of Django static and media files not working when DEBUB = False : 1.)First way: devserver in insecure mode If you still need to server static locally ( e.g. for testing without debug ) you can run devserver in insecure mode: python manage.py runserver --insecure --insecure: it means you can run serve

how to create enum in java

What is enum in Java? An enum is a special "data type" that used to create our own datatype like classes and It represents a group of constants (a variable that does not change). The enum is short for "enumerations", which means "specifically listed" and the Enum data also known as Enumerated Data Type. # Defining Java enum Instead of C/C++, in java programming language enum types are more powerful. Here, we can define an enum both inside and enum outside the class but not inside a Method "Rules" to defing enum in Java: To create an enum in Java, use the enum keyword (instead of class or interface) , and separate the constants with a comma (,) . The enum can be defined within or outside the class because it is similar to a class. The semicolon (;) at the end of the enum constants are optional Because enum are constants, the names of an enum type's fields are in uppercase letters.

java program for student details using inheritance

# Java program to print student details using "single-level" inheritance In this section, You will learn how to print student details using single inheritance in java, with Scanner and without Scanner class. 1.) With " Scanner " class Let's try to create a simple example :   ➤ Example : student.java; import java.util.Scanner; class StudentDetails {    int roll_no ;    String name , cl ; //creating a function to take student details    void input () { Scanner sc = new Scanner ( System . in );   System . out . print ( "Ente