Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Angular Interview Questions and Answers

Question: What is TypeScript?
Answer:

TypeScript is a strongly typed superset of JavaScript created by Microsoft that adds optional types, classes, async/await and many other features, and compiles to plain JavaScript. Angular is written entirely in TypeScript as a primary language. You can install TypeScript globally as:

npm install -g typescript

Let's see a simple example of TypeScript usage:-

function greeter(person: string) {

  return "Hello, " + person;

}

let user = "Arindam";

document.body.innerHTML = greeter(user);

The greeter method allows only string type as argument.

Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook