জাভাস্ক্রিপ্ট কনস্ট্রাক্টরে বুলিয়ান ব্যবহার করতে, জাভাস্ক্রিপ্ট boolean constructor() মেথড ব্যবহার করুন। এটি ইনস্ট্যান্সের প্রোটোটাইপ তৈরি করা বুলিয়ান ফাংশনের রেফারেন্স রিটার্ন করে।
উদাহরণ
কনস্ট্রাক্টরে বুলিয়ান ব্যবহার শিখতে নিচের কোডটি চালান:
<html> <head> <title>JavaScript constructor() Method</title> </head> <body> <script> var bool = new Boolean( ); document.write("bool.constructor() is:"+bool.constructor); </script> </body> </html>