¡@

Home 

javascript Programming Glossary: this.z

Should I use prototype or not?

http://stackoverflow.com/questions/4691044/should-i-use-prototype-or-not

is preferable function Vector3D x y z this.x x this.y y this.z z Vector3D.prototype.magnitude function return Math.sqrt this.x.. function return Math.sqrt this.x this.x this.y this.y this.z this.z or function Vector3D x y z this.x x this.y y this.z z.. return Math.sqrt this.x this.x this.y this.y this.z this.z or function Vector3D x y z this.x x this.y y this.z z this.magnitude..

Can I define custom operator overloads in Javascript?

http://stackoverflow.com/questions/4700085/can-i-define-custom-operator-overloads-in-javascript

via chaining. function Vector x y z this.x x this.y y this.z z Vector.prototype.add function v2 var v new Vector this.x v2.x.. function v2 var v new Vector this.x v2.x this.y v2.y this.z v2.z return v Vector.prototype.equal function v2 return this.x.. function v2 return this.x v2.x this.y v2.y this.z v2.z You can see online sample here . Update Here's a more extensive..