this

命令 Instruction Type
this This format
Commentary
オブジェクト自身を示します。 Shows the object itself.
サンプルコード Sample code
function calc(a,b) function calc (a, b)
{ (
this.mul = a * b; this.mul = a * b;
this.div = a / b; this.div = a / b;
this.add = a + b; this.add = a + b;
this.sub = a - b; this.sub = a - b;
} )
cObj = new calc(2,3); cObj = new calc (2,3);
outputs[0] = "加算結果は"+cObj.add+"です"; outputs [0] = "Addition result is" + cObj.add + "is";