6 lessons

Coding the Web - The Basics

In this course we will discuss the basics of the technologies that power the modern web. We will cover the basics of HTML and Typescript.

Lesson 3

Typescript

In this lesson we will learn the basics of Typescript, a language that compiles to javascript, which runs natively on every web browser in the world.

Comment

A comment is used to tell the computer that some text is a note for the developer and the code should not be executed.

Primitives

Boolean

A boolean can be true or false.

Number

A number can be any number.

String

A string is a collection of characters.

Array

An array is a special data type that can store multiple values of different data types.

Object

An object is a bunch of primitive values put together to make a new data type.

Function

A function allows the programmer to abstract some code and run it somewhere else.

primitives

Variables

In typescript, you can declare a new variable using const or let.

const vs let

Operators

Below are some of the most commonly used built-in operators.

operators

Functions

A function consists of two main parts, the function parameters, and the function body.

function parts

After the programmer writes the code they want in the function body. They can specify what should be returned from the function using the return keyword.

Return statement
function parameters

Call a function

To call a function you can use the function name followed by () .

calling a function

Get the results of a function

get function result

String Interpolation

Because engineers work with strings of characters a lot, typescript makes it easy to compose them together with string interpolation.

string interpolation

Types

  1. number (numeric value)

  2. string (a collection of characters)

  3. array (many values)

  4. boolean (true of false)

  5. any (any type)

In typescript, many types will be inferred by the system. Meaning you don't have to explicitly write them out. You can create your own types using the interface keyword.

custom type

Looking forward to meeting you.

Email us now at
info@raidoninc.com

433 Broadway Suite 404, New York, NY 10012

© 2023 Raidon Inc. LLC. - Build The Future, All Rights Reserved.