1. Backbone.js
- var AppView = Backbone.View.extend({ el: $('#container'), // template which has the placeholder 'who' to be substitute later. template: _.template("<h3>Hello <%= who %></h3>"), initialize: function(){ this.render(); render: function(){ // render the function using substituting the varible 'who' for 'world!'.
2. Bash
echo "Hello World"
3. Basic
PRINT "Hello, world!"
4. C
#include
int main(void)
{
puts("Hello, world!");
}
5. C++
#include
int main()
{
std::cout << "Hello, world!
";
return 0;
}
6. C#
using System;
class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello, world!");
}
}
7. Clipper
? "Hello World"
8. CoffeeScript
console.log 'Hello, world!'
9. Delphi
program HelloWorld;
begin
Writeln('Hello, world!');
end.
10. HTML
Hello World!
11. Java
import javax.swing.JFrame; //Importing class JFrame
import javax.swing.JLabel; //Importing class JLabel
public class HelloWorld {
public static void main(String[] args) {
JFrame frame = new JFrame(); //Creating frame
frame.setTitle("Hi!"); //Setting title frame
frame.add(new JLabel("Hello, world!"));//Adding text to frame
frame.pack(); //Setting size to smallest
frame.setLocationRelativeTo(null); //Centering frame
frame.setVisible(true); //Showing frame
}
}
12. JavaScript
document.write('Hello, world!');
13. jQuery
$("body").append("Hello world!");
14. Julia
println("Hello world!")
15. Logo
print [Hello, world!]
16. MatLab
disp('Hello, world!')
17. Objective-C
#import
#import
int main(void)
{
NSLog(@"Hello, world!
");
return 0;
}
18. Pascal
program HelloWorld;
begin
WriteLn('Hello, world!');
end.
19. Perl 5
print "Hello, world!
";
20. PHP
21. Processing
void setup(){
println("Hello, world!");
}
22. Python
print "Hello, world!"
23. R
cat('Hello, world!
')
24. Ruby
puts "Hello, world!"
25. Swift
println("Hello, world!")
26. VBScript
MsgBox "Hello, World!"
27. Visual Basic .NET
Module Module1
Sub Main()
Console.WriteLine("Hello, world!")
End Sub
End Module
28. XSLT
Hello World