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) {
this.foo = foo
}
x = new Foo('x')
console.log(x.foo) // x