let isDone: boolean = false;
let decimal: number = 6;
let hex: number = 0xf00d;
let binary: number = 0b1010;
let octal: number = 0o744;
let color: string = "blue";
color = 'red';
let fullName: string = `Bob Bobbington`;
let age: number = 37;
let sentence: string = `Hello, my name is ${ fullName }.
I'll be ${ age + 1 } years old next month.`
let list: number[] = [1, 2, 3];
let list: Array<number> = [1, 2, 3];
let list: number[] = [1, 2, 3];
let list: Array<number> = [1, 2, 3];
// Declare a tuple type
let x: [string, number];
// Initialize it
x = ["hello", 10]; // OK
// Initialize it incorrectly
x = [10, "hello"]; // Error
// OK
console.log(x[0].substr(1));
// Error, 'number' does not have 'substr'
console.log(x[1].substr(1));
enum Color {Red, Green, Blue};
let c: Color = Color.Green;
// OK
console.log(x[0].substr(1));
// Error, 'number' does not have 'substr'
console.log(x[1].substr(1));