Skip to content

Instantly share code, notes, and snippets.

@yeco
Created May 22, 2010 01:09
Show Gist options
  • Select an option

  • Save yeco/409640 to your computer and use it in GitHub Desktop.

Select an option

Save yeco/409640 to your computer and use it in GitHub Desktop.
var ball = {
type: "round",
color: "red",
getInfo: function () {
return this.color + ' ' + this.type + ' ball';
}
}
// uso
ball.color = "reddish";
alert(ball.getInfo());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment