Hello World in 28 programming languages


SUBMITTED BY: WinningRed

DATE: Oct. 13, 2016, 11:54 a.m.

FORMAT: Text only

SIZE: 2.4 kB

HITS: 1233

  1. 1. Backbone.js
  2. - 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!'.
  3. 2. Bash
  4. echo "Hello World"
  5. 3. Basic
  6. PRINT "Hello, world!"​
  7. 4. C
  8. #include
  9. int main(void)
  10. {
  11. puts("Hello, world!");
  12. }
  13. 5. C++
  14. #include
  15. int main()
  16. {
  17. std::cout << "Hello, world!
  18. ";
  19. return 0;
  20. }
  21. 6. C#
  22. using System;
  23. class Program
  24. {
  25. public static void Main(string[] args)
  26. {
  27. Console.WriteLine("Hello, world!");
  28. }
  29. }
  30. 7. Clipper
  31. ? "Hello World"
  32. 8. CoffeeScript
  33. console.log 'Hello, world!'
  34. 9. Delphi
  35. program HelloWorld;
  36. begin
  37. Writeln('Hello, world!');
  38. end.
  39. 10. HTML
  40. Hello World!
  41. 11. Java
  42. import javax.swing.JFrame; //Importing class JFrame
  43. import javax.swing.JLabel; //Importing class JLabel
  44. public class HelloWorld {
  45. public static void main(String[] args) {
  46. JFrame frame = new JFrame(); //Creating frame
  47. frame.setTitle("Hi!"); //Setting title frame
  48. frame.add(new JLabel("Hello, world!"));//Adding text to frame
  49. frame.pack(); //Setting size to smallest
  50. frame.setLocationRelativeTo(null); //Centering frame
  51. frame.setVisible(true); //Showing frame
  52. }
  53. }
  54. 12. JavaScript
  55. document.write('Hello, world!');
  56. 13. jQuery
  57. $("body").append("Hello world!");
  58. 14. Julia
  59. println("Hello world!")
  60. 15. Logo
  61. print [Hello, world!]
  62. 16. MatLab
  63. disp('Hello, world!')
  64. 17. Objective-C
  65. #import
  66. #import
  67. int main(void)
  68. {
  69. NSLog(@"Hello, world!
  70. ");
  71. return 0;
  72. }
  73. 18. Pascal
  74. program HelloWorld;
  75. begin
  76. WriteLn('Hello, world!');
  77. end.
  78. 19. Perl 5
  79. print "Hello, world!
  80. ";
  81. 20. PHP
  82. 21. Processing
  83. void setup(){
  84. println("Hello, world!");
  85. }
  86. 22. Python
  87. print "Hello, world!"
  88. 23. R
  89. cat('Hello, world!
  90. ')
  91. 24. Ruby
  92. puts "Hello, world!"
  93. 25. Swift
  94. println("Hello, world!")
  95. 26. VBScript
  96. MsgBox "Hello, World!"
  97. 27. Visual Basic .NET
  98. Module Module1
  99. Sub Main()
  100. Console.WriteLine("Hello, world!")
  101. End Sub
  102. End Module
  103. 28. XSLT
  104. Hello World

comments powered by Disqus