- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use a Boolean in JavaScript Constructors?
To use Boolean in JavaScript constructors, use JavaScript boolean constructor() method. It returns a reference to the Boolean function that created the instance's prototype.
Example
You can try to run the following code to learn how to use Booleans in Constructors
<html> <head> <title>JavaScript constructor() Method</title> </head> <body> <script> var bool = new Boolean( ); document.write("bool.constructor() is:"+bool.constructor); </script> </body> </html>
Advertisements