// To convert a boolean to a string we use the .toString() method
let isValid = true;
console.log(isValid.toString()); // outputs "true"
console.log(isValid); // outputs true
booleanToString = b => { return b.toString(); }
// Way cleaner Version! easy readability!!
bool.toString()
ES6+
const string = "false"
const string2 = "true"
const test = (val) => (val === "true" || val === "True")
console.log(test(string))
console.log(test(string2))