Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. Which is the correct code that returns a complex number that is the complex conjugate of this one?

  2. 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); };

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    The above code snippet returns a complex number that is the complex conjugate of this one.


Be The First To Comment