如何在JavaScript中将Boolean转换为String?

您可以尝试运行以下命令以了解如何在JavaScript中将Boolean转换为String-

示例

<!DOCTYPE html>
<html>
   <body>
      <p>Convert Boolean to String</p>
      <script>
         var myBool = false;
         document.write("<br>String : " + String(myBool));
      </script>
   </body>
</html>