title: Use class Syntax to Define a Constructor Function
challengeType: 1
---
## Description
<sectionid='description'>
ES6 provides a new syntax to help create objects, using the keyword <dfn>class</dfn>.
This is to be noted, that the <code>class</code> syntax is just a syntax, and not a full-fledged class based implementation of object oriented paradigm, unlike in languages like Java, or Python, or Ruby etc.
In ES5, we usually define a constructor function, and use the <code>new</code> keyword to instantiate an object.
Notice that the <code>class</code> keyword declares a new function, and a constructor was added, which would be invoked when <code>new</code> is called - to create a new object.<br>
<li> The constructor method is a special method for creating and initializing an object created with a class. You will learn more about it in the Object Oriented Programming section of the JavaScript Algorithms And Data Structures Certification.</li></ul>