Skip to content

Instantly share code, notes, and snippets.

Avatar

Stephen Matthew Davies stevematdavies

View GitHub Profile
View arrowFuncs.js
var x = {
name:'Steve',
hello:function(){
var that = this;
var helper = function(){
console.log('X Name ',that.name);
};
helper();
}
View script.js
function Person(name, age, job) {
this.name = name;
this.age = age;
this.job = job;
this.sayName = function() {
console.log(this.name);
};
}