How method toString works
In this lesson will see, how the method toString in JavaScript works and how we can modify this method. Each object in JavaScript contains a toString method, and this method returns a textual representation of the object. We have a class called Car, which contains brand, color and maximum speed. We create an instance of the Car class named anyCar and add arguments to the constructor.