Explore Courses Blog Tutorials Interview Questions
0 votes
in Java by (13.1k points)
Is there is any constructor present inside a classes or objects in JavaScript? And how it is created?

1 Answer

0 votes
by (26.7k points)

Basically, all the objects will have a constructor. You can find the below code to understand how a constructor is created:

function Intellipaat(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!!

Related questions

0 votes
1 answer
0 votes
1 answer
asked Aug 12, 2019 in Web Technology by Sammy (47.6k points)
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.5k answers


108k users

Browse Categories