I wonder about what the best way is to create an JavaScript object that has properties and methods.
I have seen examples where the person used var self = this<
var self = this<
var Person = function (lastname, age, job){ this.name = name; this.age = age; this.job = job; this.changeName = function(name){ this.lastname = name; } } var myWorker = new Person('Adeola', 23, 'Web Developer'); myWorker.changeName('Timmy'); console.log("New Worker" + myWorker.lastname);