C/C++
#include "cstdio"
int main() {
printf("Hello World\n");
return 0;
}
Rust
fn main() {
// The statements here will be executed when the compiled binary is called
// Print text to the console
println!("Hello World!");
}
Python
def foo():
print("Hello")
foo()
Javascript
console.log('Hello!')
Scheme
(((lambda (f)
((lambda (proc)
(f (lambda (arg) ((proc proc) arg))))
(lambda (proc)
(f (lambda (arg) ((proc proc) arg))))))
(lambda (self)
(lambda (ls)
(if (null? ls) 0 (+ 1 (self (cdr ls)))))))
'(a b c d e))
function Greeter(greeting: string) {
return greeting + "!"
}
console.log(Greeter("Hi"))
<div class="abc">
<a href="https://github.com">Github</a>
</div>
cat("Printing objects: "); print(X)
print("Accessing individual elements:")
cat(sprintf("Your height is %s and your weight is %s\n", X$height, X$weight))