Which is the correct code that returns a complex number that is the complex conjugate of this one?
(a) Complex.prototype.conj = function() { return new Complex(this.r, -this.i); };
(b) Complex.prototype.conj = function() { return Complex(this.r, -this.i); };
(c) Complex.prototype.conj = function() { return (this.r, -this.i); };
(d) Complex.prototype.conj = function() { new Complex(this.r, -this.i); };
I got this question in exam.
My doubt stems from Augmentation of Classes topic in division Classes and Modules in JavaScript of JavaScript