বুলিয়ান কনস্ট্রাক্টর প্রপার্টি কনস্ট্রাক্টর ফাংশন প্রদান করে যা বুলিয়ান প্রোটোটাইপ তৈরি করেছে −
নিচে জাভাস্ক্রিপ্ট বুলিয়ান কনস্ট্রাক্টর প্রপার্টি -
-এর কোড দেওয়া হলউদাহরণ
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
</style>
</head>
<body>
<h1>JavaScript Boolean constructor Property</h1>
<p class="sample"></p>
<button class="btn">CLICK HERE</button>
<h3>Click on the above button to get the boolean constructor function</h3>
<script>
var bool = true;
document.querySelector(".btn").addEventListener("click", () => {
document.querySelector(".sample").innerHTML =
"The boolean constructor function: <br>" + bool.constructor;
});
</script>
</body>
</html> আউটপুট

"এখানে ক্লিক করুন" বোতামে ক্লিক করলে -
