AICollection Help

Hello, World

Hello World Example in JavaScript

Here is a simple "Hello, World!" program in JavaScript:

console.log("Hello, World!");

Instructions to Run the Program

Using Node.js

  1. Install Node.js:

  2. Create the JavaScript File:

    • Create a new file named helloWorld.js and paste the above code into it.

  3. Run the JavaScript Program:

    • Open a terminal and navigate to the directory where helloWorld.js is located.

    • Run the program using the node command:

      node helloWorld.js

You should see the output:

Hello, World!

Using Deno

  1. Install Deno:

  2. Create the JavaScript File:

    • Create a new file named helloWorld.js and paste the above code into it.

  3. Run the JavaScript Program:

    • Open a terminal and navigate to the directory where helloWorld.js is located.

    • Run the program using the deno command:

      deno run helloWorld.js

You should see the output:

Hello, World!

Using Bun

  1. Install Bun:

  2. Create the JavaScript File:

    • Create a new file named helloWorld.js and paste the above code into it.

  3. Run the JavaScript Program:

    • Open a terminal and navigate to the directory where helloWorld.js is located.

    • Run the program using the bun command:

      bun run helloWorld.js

You should see the output:

Hello, World!
Last modified: 27 November 2024