Hello, World!
Hey guys, my name is Reinhardt.
This is my first post ^_^
I am a beginner / hobbyist web developer. I would like to share my love for coding web apps with everyone. I will be sharing many tips and tricks, sample code, app reviews, tutorials and much more with you.
What topic should one start a programming / coding blog with?
“Hello, World!” of course!
A “Hello, World!” program is a program that one usually learns to write at the very start of your path to becoming a programmer / web developer. Its functionality is to output to the screen the text: “Hello, World!” This serves to way to demonstrate the basic syntax and structure of the language that you are learning.
Below
are listed 10 examples of “Hello, World!” program code in
different programming languages:
1) HTML:
<!DOCTYPE html>
<html>
<head>
<title>Hello, world!</title>
</head>
<body>
<h3>Hello, world!</h3>
</body>
</html>
2) CSS:
h3
{
color: red;
}
3) PHP:
<?php
echo "Hello, world!";
?>
4) MYSQL:
SELECT 'Hello, World!' FROM first_program;
5) Javascript:
console.log("Hello, world!");
6) Python:
print("Hello, world!")
7) Ruby On Rails:
# in the controller
class HelloController < ApplicationController
def index
render plain: "Hello, world!"
end
end
# in the routes file
Rails.application.routes.draw do
get 'hello/index'
root 'hello#index'
end
8) Bash Shell:
#!/bin/bash
echo "Hello, world!"
9) JAVA:
class Main {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
10) C#
using System;
class Program {
static void Main(string[] args) {
Console.WriteLine("Hello, world!");
}
}
This is just a small sample.
There are 100's of computer programming languages in existence, each with their own use case, pros and cons, etc.
Hope you guys liked this sample code.
Happy coding and stay safe :-)