DEV Community

Rik de Graaff
Rik de Graaff

Posted on

Some questions about JS

Hello everybody,

I am stuck now with my JS course.

First, I need to type a constructor code.
But I do not understand what a constructor exactly does.
First question, what is a constructor?

It also needs some attributes and methods.
So I thought that var var1 = { .... } should work.
But it did not.

I need to call the methodes firstName; lastName; yearOfBirth.
Further how do I make 2 objects?
So 2 "profiles", I think.

And I need some code to create buttons for altering the firstName; lastName; yearOfBirth.

I hope I've explained it right, otherwise let me know.
Greetings, Rik

Top comments (0)