Back
Basically, all the objects will have a constructor. You can find the below code to understand how a constructor is created:
function Intellipaat(name) { this.name = name}let theIntellipaat = new Intellipaat('Redwood')console.log('theIntellipaat.constructor is ' + theIntellipaat.constructor)
function Intellipaat(name) {
this.name = name
}
let theIntellipaat = new Intellipaat('Redwood')
console.log('theIntellipaat.constructor is ' + theIntellipaat.constructor)
I hope this will help.
Want to know more about Java? Prefer this tutorial on Core Java Tutorial.
Want to become a Java Expert? Join Java Certification now!!
31k questions
32.8k answers
501 comments
693 users