O'Reilly logo

Learning Angular for .NET Developers by Rajesh Gunasundaram

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Boolean

The boolean data type can hold either true or false. Declaring and initializing this data type is quite easy and is illustrated as follows:

let isSaved: boolean = false; 

Here, the isSaved variable is declared as boolean and is assigned with the value false. If the developer assigns a string value to the isSaved variable by mistake, the TypeScript will show an error and highlight the statement.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required