Hello World
Welcome to the TypeScript playground. This site is a lot
like running a TypeScript project inside a web browser.
The playground makes it easy for you to safely experiment
with ideas in TypeScript by making it trivial to share
these projects. The URL for this page is everything
required to load the project for someone else.
// You can see on the right the result of the TypeScript
compiler: this is vanilla JavaScript which can run on
browsers, servers or anywhere really.
const hello = "Hello";
// You can see how it makes tiny changes to the code, by
converting a "const" to a "var". This is one of the many
things TypeScript does to make it possible to run
anywhere JavaScript runs.
const world = "World";
// Now that you have an idea of how the playground works,
let's look at how TypeScript makes working with
JavaScript more fun. During this section we'll be trying
to keep as close to vanilla JavaScript as possible to
show how you can re-use existing knowledge.
Click below to continue:
example:objects-and-arrays
console.log(hello + " " + world);