Hello world.

Hello World

How to write Hello World in different languages? Let's see:

Hello world in Python

Just use print function

print('Hello World!')

or using just (')

print("Hello World!")

Java

There is System.out.print function

public class Hello {
  public static void main(String[] args){
    System.out.print("Hello World");
  }
}

Hello world in Golang

You should us Println from fmt package

package main
import "fmt"
func main() {
    fmt.Println("Hello World")
}

Bash

Just echo without any quotation marks (you can use it but it's not necessary

echo Hello World!

JavaScript

First example shows alert window whereas second prints to the browser console.

<script>
    alert('Hello, world!');
</script>

Second

  <script>
      console.log('Hello World!')
  </script>

Of course, above examples are just pieces of the code. How to run these codes? This is another part of the story. Maybe good enough for another port.

More info

Wiki

Manna

Leave a Reply

Your email address will not be published. Required fields are marked *