function johnMary(string $string) : bool { return false; } code example
Example 1: boolean as string javascript
bool.toString()
Example 2: javascript true string to boolean
var isHidden='true';
var isHiddenBool = (isHidden == 'true');
bool.toString()
var isHidden='true';
var isHiddenBool = (isHidden == 'true');