The Boolean type is available in JavaScript and TypeScriptBooleans are the simplest types you will ever meet in a programming language. They answer the question with yes or no, which is represented in JavaScript as true or false:

let isHappy: boolean = true;let done: boolean = false;

Get TypeScript 2.x for Angular Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.