In this video you have created an object in which the value is defined by the programmer, then how we will create an object that accepts the value given by the user…?
Object oriented programming lecture 2
You can pass the user inputs using the command line arguments when running the js file, and pass them while making the object.