MCQs > IT & Programming > JavaScript > What's the output? 'use strict' class Xw{ constructor(t, p) { this.t = t; this.p = p; } pp() { var x=49; var c = 21; if(x=7) c++; else if(x>6) c=c+8; else c=c*4; document.write(c++ + this.t + this. p*2); } } var Obj1 = new Xw(19,29); Obj1.pp();

JavaScript MCQs

What will be the correct output of the following JavaScript code?
'use strict'
class Xw{
  constructor(t, p) {
     this.t = t;
     this.p = p;
  }
  pp() {
     var x=49;
     var c = 21;
            if(x=7)
                c++;
            else if(x>6)
                c=c+8;
            else
                c=c*4;  
           document.write(c++ + this.t + this. p*2);
  }
}

var Obj1 = new Xw(19,29);
Obj1.pp();


Answer

Correct Answer: 99

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it