How Can I Tell What Parameters to put into the constructor?

I have noticed that on the projects I am doing they will sometimes tell you to " create a constructor() that accepts number arguments.". How can I know which arguments to put into this, like what should I name them and how do I know what to name them?


Before we look at your code, let’s be sure we understand what a constructor is…

function Foo(foo) { = foo

x = new Foo('x')

console.log(    //  x