summaryrefslogtreecommitdiff
path: root/docs/examples/hello_world.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/hello_world.md')
-rw-r--r--docs/examples/hello_world.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/examples/hello_world.md b/docs/examples/hello_world.md
index 90a833f71..e1097497d 100644
--- a/docs/examples/hello_world.md
+++ b/docs/examples/hello_world.md
@@ -1,5 +1,12 @@
# Hello World
+## Concepts
+
+- Deno can run JavaScript or TypeScript out of the box with no additional tools
+ or config required
+
+## Overview
+
Deno is a secure runtime for both JavaScript and TypeScript. As the hello world
examples below highlight the same functionality can be created in JavaScript or
TypeScript, and Deno will execute both.
@@ -12,6 +19,9 @@ and the code ensures the name provided is capitalized.
**Command:** `deno run hello-world.js`
```js
+/**
+ * hello-world.js
+ */
function capitalize(word) {
return word.charAt(0).toUpperCase() + word.slice(1);
}
@@ -44,6 +54,9 @@ rather than a `*.js` file.
**Command:** `deno run hello-world.ts`
```ts
+/**
+ * hello-world.ts
+ */
function capitalize(word: string): string {
return word.charAt(0).toUpperCase() + word.slice(1);
}