Skip to main content

Hello World — Your First Program

Traditionally, the first program in any language prints "Hello, World!" to the screen. Let's do that!

Create Your First File​

  1. Open your text editor (VS Code, Notepad, etc.)
  2. Create a new file named hello.adesh
  3. Type this code:
print("Hello, World!");

Output:

Hello, World!

Run It​

Open a terminal in the folder where you saved the file:

adesh run hello.adesh

Output:

Hello, World!

🎉 You just ran your first Adesh program!

What Just Happened?​

CodeMeaning
print(...)A function that displays text
"Hello, World!"A string — text wrapped in quotes
;Ends a statement (like a period in English)

Try It Yourself​

Change the message and run again:

print("Hello, Adesh!");
print("I'm learning to code!");
print("This is fun!");

Output:

Hello, Adesh!
I'm learning to code!
This is fun!

Understanding the Parts​

The print Function​

Think of print as a machine: you give it something, it shows it on screen.

print("Hello"); // Input: "Hello" → Output: Hello
print(42); // Input: 42 → Output: 42
print(true); // Input: true → Output: true
print(3.14); // Input: 3.14 → Output: 3.14

Output:

Hello
42
true
3.14

Strings​

Text in programming is called a string (a string of characters).

"This is a string"
"123" // Numbers as text
"Hello, World!" // With punctuation
"" // Empty string

Use double quotes " for strings. Single quotes ' are for single characters.

Statements and Semicolons​

Each line of action ends with ;. It tells Adesh "this instruction is complete."

print("Line 1"); // Statement 1
print("Line 2"); // Statement 2
print("Line 3"); // Statement 3

Output:

Line 1
Line 2
Line 3

Without ;, Adesh gets confused about where one instruction ends and the next begins.

Common Mistakes​

MistakeErrorFix
Missing quotesprint(Hello)Use print("Hello")
Missing semicolonprint("Hi")Add ; at end
Wrong file extensionhello.txtUse .adesh

Experiment!​

Try these variations:

// Print multiple things at once
print("Name:", "Alice", "Age:", 30);

// Print with custom separator
print("Apple", "Banana", "Cherry", { sep: ", " });
// Output: Apple, Banana, Cherry

// Print without newline at end
print("Loading", { end: "..." });
print("Done!");
// Output: Loading...Done!

Output:

Name: Alice Age: 30
Apple, Banana, Cherry
Loading...Done!

Summary​

✅ You learned:

  • How to create and run an .adesh file
  • The print function displays output
  • Strings are text in double quotes
  • Statements end with ;

Next Step​

Ready to store and use data? Continue to Variables & Data →