Tcobb, thank you for your continued response in trying to help me.
I'm really confused. I come from Java, and all I'm trying to do is create a class that behaves properly as an OOP class. All I want is a class that can behave like this:
var p1 = new Person("John");
var p2 = new Person("Jane");
console.log(p1.firstName); // and it would print 'John'
console.log(p2.firstName); // and it would print 'Jane'
OR
var p1 = new Person();
var p2 = new Person();
p1.firstName = "John";
p2.firstName = "Jane";
console.log(p1.firstName); // and it would print 'John'.
console.log(p2.firstName); // and it would print 'Jane'.
The examples you showed me somehow does only the second. Is there a way to create a class that can do BOTH of the above and have firstName defined as a getter and setter internally?
I'm also trying to just make an object with the capability of having private and public properties and methods. Once I can do that, I'm done with this part and I'm moving on, but I can't seem to accomplish this seemingly simple goal.
Do you think you can show me a code snippet to make an object that meets the criteria I'm striving for? I don't think it will be exceedingly long. Thanks.