Skip to content

Instantly share code, notes, and snippets.

@eiel
Last active December 10, 2015 12:38
Show Gist options
  • Save eiel/4435598 to your computer and use it in GitHub Desktop.
Save eiel/4435598 to your computer and use it in GitHub Desktop.
javascriptの説明で使うだけ。
var Dog = function( t_name, t_color ){
this.name = t_name;
this.color = t_color;
};
Dog.prototype.bow = function () {
alert( this.name );
};
var taro = new Dog( "taro", "black" );
taro.bow();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment