Skip to content

Instantly share code, notes, and snippets.

@sharmaabhinav
Created January 17, 2015 16:58
Show Gist options
  • Select an option

  • Save sharmaabhinav/0bbe902e70f2efdea5df to your computer and use it in GitHub Desktop.

Select an option

Save sharmaabhinav/0bbe902e70f2efdea5df to your computer and use it in GitHub Desktop.
var greet = function(callback) {
var todaysGreeting = "Hello, ";
callback(todaysGreeting);
}
var Greeter = function(name) {
this.name = name;
this.sa;
this.sal = function(sa){
this.sa = sa;
console.log(this.sa)
}
new greet(this.sal);
this.run = function (){
alert(this.sa + this.name);
}
}
var abc = new Greeter("world!")
abc.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment