1// To convert a boolean to a string we use the .toString() method
2let isValid = true;
3
4console.log(isValid.toString()); // outputs "true"
5console.log(isValid); // outputs true
6
1// cannot use toString(), use instead String()
2var myBool: boolean = true;
3var myString: string = String(myBool);
1booleanToString = b => { return b.toString(); }
2// Way cleaner Version! easy readability!!